mirror of
https://github.com/dropbox/json11.git
synced 2024-11-27 07:59:50 +08:00
add cmake option for dr1467 canary tests
This commit is contained in:
parent
649b54ae28
commit
42ce09babf
@ -4,6 +4,7 @@ project(json11 VERSION 1.0.0 LANGUAGES CXX)
|
||||
enable_testing()
|
||||
|
||||
option(JSON11_BUILD_TESTS "Build unit tests" ON)
|
||||
option(JSON11_ENABLE_DR1467_CANARY "Enable canary test for DR 1467" ON)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
@ -16,6 +17,14 @@ target_compile_options(json11
|
||||
configure_file("json11.pc.in" "json11.pc" @ONLY)
|
||||
|
||||
if (JSON11_BUILD_TESTS)
|
||||
|
||||
# enable test for DR1467, described here: https://llvm.org/bugs/show_bug.cgi?id=23812
|
||||
if(JSON11_ENABLE_DR1467_CANARY)
|
||||
add_definitions(-D JSON11_ENABLE_DR1467_CANARY=1)
|
||||
else()
|
||||
add_definitions(-D JSON11_ENABLE_DR1467_CANARY=0)
|
||||
endif()
|
||||
|
||||
add_executable(json11_test test.cpp)
|
||||
target_link_libraries(json11_test json11)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user