Skip to content

Commit

Permalink
Fix windows compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cmmarslender committed Mar 7, 2024
1 parent a1ed1df commit 53aed6e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.14 FATAL_ERROR)
option(BUILD_CHIAVDFC "Build the chiavdfc shared library" OFF)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

IF(NOT CMAKE_BUILD_TYPE)
Expand All @@ -15,6 +16,10 @@ set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
)

if(MSVC)
add_compile_options(/EHsc)
endif()

if(WIN32)
set(MPIR_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../mpir_gc_x64")
set(MPIR_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../mpir_gc_x64")
Expand Down Expand Up @@ -44,8 +49,6 @@ else()
)
endif()

set (CMAKE_CXX_FLAGS "-std=c++17")

# CMake 3.14+
include(FetchContent)

Expand Down

0 comments on commit 53aed6e

Please sign in to comment.