Skip to content

Commit

Permalink
Modified test CMakeList
Browse files Browse the repository at this point in the history
  • Loading branch information
Gulin7 committed Nov 28, 2024
1 parent 30a23c4 commit 4311f43
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,15 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
/we4906 # string literal cast to 'LPWSTR'
/we4928 # illegal copy-initialization; more than one user-defined conversion has been implicitly applied
/we5038 # data member 'member1' will be initialized after data member 'member2'
/Zc:__cplusplus
/MD)
/Zc:__cplusplus)
target_compile_options(${test_target}
PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/DMSVC_RUNTIME_LIBRARY=MultiThreadedDLL>
)
target_compile_options(${test_target_catch2}
PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/DMSVC_RUNTIME_LIBRARY=MultiThreadedDLL>
)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(compiles_options
-Wall # reasonable and standard
Expand Down Expand Up @@ -214,10 +221,6 @@ target_compile_options(${test_target_catch2}
target_link_options(${test_target_catch2}
PRIVATE
$<$<BOOL:USE_SANITIZER>:${SANITIZER_LINK_OPTIONS}>)
target_compile_definitions(${test_target_catch2}
PRIVATE
_ITERATOR_DEBUG_LEVEL=0
)
# We do not use non-standard C++
set_target_properties(${test_target_catch2} PROPERTIES CMAKE_CXX_EXTENSIONS OFF)
target_compile_features(${test_target_catch2} PRIVATE cxx_std_20)
Expand Down

0 comments on commit 4311f43

Please sign in to comment.