Skip to content

Commit fd9a703

Browse files
author
Eddie
committed
Enables testing in MSVC side
1 parent 1a14eec commit fd9a703

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,12 @@ if(MSVC)
4444
egyptian.cpp var.cpp variant.cpp CopyMoveAbilities.cpp
4545
)
4646

47+
add_subdirectory(third_party EXCLUDE_FROM_ALL)
48+
4749
# Simple executable for MSVC
4850
add_executable(ZooTest ${ZOO_TEST_SOURCES})
49-
target_compile_definitions(ZooTest PUBLIC AVOID_MSVC_BUG_SFINAE_INVALID_EXPLICIT_TEMPLATE_ARGUMENT)
51+
enable_testing()
52+
ParseAndAddCatchTests(ZooTest)
5053

5154
try_compile(
5255
MSVC_BUG_BUILD_RESULT
@@ -76,7 +79,6 @@ if(MSVC)
7679
else()
7780
MESSAGE(FATAL_ERROR "CMAKE try_compile of non-problematic file did not succeed: ${MSVC_OK_OUTPUT}")
7881
endif()
79-
8082
else()
8183
# Non-MSVC specific configuration (original content)
8284
set(CMAKE_CXX_STANDARD 17)
@@ -151,5 +153,4 @@ else()
151153
include_directories(${TEST_THIRD_PARTY_INCLUDE_PATH})
152154
enable_testing()
153155
ParseAndAddCatchTests(${TEST_APP_NAME})
154-
155156
endif()

0 commit comments

Comments
 (0)