Skip to content

Commit

Permalink
minor CMake refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
vsoftco committed Sep 4, 2023
1 parent 8b5ed53 commit 607f063
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ if (MSVC)
include_directories(SYSTEM libs/pthreadwin32)
add_compile_options(-bigobj)
add_compile_definitions(NOMINMAX)
if (MSVC_VERSION GREATER_EQUAL 1914)
add_compile_options("/Zc:__cplusplus")
endif ()
endif ()

#### MinGW or Cygwin have issues with object files that are too large
Expand Down
1 change: 0 additions & 1 deletion tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ if (${BUILD_GRID_SYNTH})
find_package(PkgConfig REQUIRED)
pkg_check_modules(gmp REQUIRED IMPORTED_TARGET gmp)
pkg_check_modules(gmpxx REQUIRED IMPORTED_TARGET gmpxx)
add_compile_definitions(__GMPXX_USE_CXX11)
else ()
find_package(GMP REQUIRED)
endif ()
Expand Down
4 changes: 3 additions & 1 deletion unit_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ set(TARGET_NAME "unit_tests")
#### Link Google Test dynamically if using MSVC
if (MSVC)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
if (MSVC_VERSION GREATER_EQUAL 1914)
add_compile_options("/Zc:__cplusplus")
endif ()
endif ()

if (${BUILD_GRID_SYNTH})
Expand All @@ -12,7 +15,6 @@ if (${BUILD_GRID_SYNTH})
find_package(PkgConfig REQUIRED)
pkg_check_modules(gmp REQUIRED IMPORTED_TARGET gmp)
pkg_check_modules(gmpxx REQUIRED IMPORTED_TARGET gmpxx)
add_compile_definitions(__GMPXX_USE_CXX11)
else ()
find_package(GMP REQUIRED)
endif ()
Expand Down

0 comments on commit 607f063

Please sign in to comment.