Skip to content
This repository was archived by the owner on Mar 26, 2020. It is now read-only.

Commit a501d06

Browse files
authored
Merge pull request #72 from admsyn/feature-cmake-dr1467-canary
Add cmake option for DR1467 canary tests
2 parents 649b54a + 6de8cac commit a501d06

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ project(json11 VERSION 1.0.0 LANGUAGES CXX)
44
enable_testing()
55

66
option(JSON11_BUILD_TESTS "Build unit tests" ON)
7+
option(JSON11_ENABLE_DR1467_CANARY "Enable canary test for DR 1467" OFF)
78

89
set(CMAKE_CXX_STANDARD 11)
910
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -16,6 +17,14 @@ target_compile_options(json11
1617
configure_file("json11.pc.in" "json11.pc" @ONLY)
1718

1819
if (JSON11_BUILD_TESTS)
20+
21+
# enable test for DR1467, described here: https://llvm.org/bugs/show_bug.cgi?id=23812
22+
if(JSON11_ENABLE_DR1467_CANARY)
23+
add_definitions(-D JSON11_ENABLE_DR1467_CANARY=1)
24+
else()
25+
add_definitions(-D JSON11_ENABLE_DR1467_CANARY=0)
26+
endif()
27+
1928
add_executable(json11_test test.cpp)
2029
target_link_libraries(json11_test json11)
2130
endif()

0 commit comments

Comments
 (0)