Skip to content

Commit

Permalink
add MSVC options
Browse files Browse the repository at this point in the history
  • Loading branch information
yaito3014 committed Sep 26, 2024
1 parent 3518225 commit 3a6f552
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,20 @@ if(BUILD_TESTING)

set(YK_COMMON_FLAG $<$<CXX_COMPILER_ID:Clang>:-stdlib=libc++>)
target_compile_definitions(
yk_util_test PRIVATE $<$<CXX_COMPILER_ID:Clang>:YK_BUILD_UNIT_TEST_FRAMEWORK=1>
yk_util_test
PRIVATE $<$<CXX_COMPILER_ID:Clang>:YK_BUILD_UNIT_TEST_FRAMEWORK=1>
PRIVATE $<$<CXX_COMPILER_ID:MSVC>:NOMINMAX>
PRIVATE $<$<CXX_COMPILER_ID:MSVC>:WIN32_LEAN_AND_MEAN>
PRIVATE $<$<CXX_COMPILER_ID:MSVC>:_UNICODE>
PRIVATE $<$<CXX_COMPILER_ID:MSVC>:UNICODE>
)
target_compile_options(
yk_util_test
PRIVATE ${YK_COMMON_FLAG}
PRIVATE $<$<CXX_COMPILER_ID:GNU>:-Wall -Wextra -pedantic-errors>
PRIVATE $<$<CXX_COMPILER_ID:Clang>:-Wall -Wextra -pedantic-errors>
PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/W4 /permissive- /Zc:__cplusplus /Zc:preprocessor /sdl /utf-8>
)
target_compile_options(yk_util_test PRIVATE ${YK_COMMON_FLAG})
target_link_options(yk_util_test PRIVATE ${YK_COMMON_FLAG})

find_package(TBB)
Expand Down

0 comments on commit 3a6f552

Please sign in to comment.