mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-09 23:24:02 +00:00
[cmake] Add optional variable to boost_geometry_add_unit_test
This commit is contained in:
parent
e45fa580ee
commit
1dea69dc6b
@ -42,8 +42,8 @@ function(boost_geometry_add_unit_test prefix item)
|
|||||||
target_compile_features(${unit_test_name} PRIVATE cxx_std_14)
|
target_compile_features(${unit_test_name} PRIVATE cxx_std_14)
|
||||||
|
|
||||||
# To be able to run ctest
|
# To be able to run ctest
|
||||||
if (NOT ("boost_geometry_${prefix}_${item}" STREQUAL "boost_geometry_cs_undefined_setops1") AND
|
set(extra_macro_args ${ARGN})
|
||||||
NOT ("boost_geometry_${prefix}_${item}" STREQUAL "boost_geometry_cs_undefined_setops2"))
|
if (NOT extra_macro_args STREQUAL "not_run")
|
||||||
add_test(NAME ${unit_test_name} COMMAND ${unit_test_name})
|
add_test(NAME ${unit_test_name} COMMAND ${unit_test_name})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -52,6 +52,7 @@ function(boost_geometry_add_unit_test prefix item)
|
|||||||
|
|
||||||
# Inform the caller about the test name. It can then set defines, if necessary.
|
# Inform the caller about the test name. It can then set defines, if necessary.
|
||||||
set(BOOST_GEOMETRY_UNIT_TEST_NAME ${unit_test_name} PARENT_SCOPE)
|
set(BOOST_GEOMETRY_UNIT_TEST_NAME ${unit_test_name} PARENT_SCOPE)
|
||||||
|
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
if (NOT TARGET tests)
|
if (NOT TARGET tests)
|
||||||
|
@ -14,8 +14,9 @@ foreach(item IN ITEMS
|
|||||||
other
|
other
|
||||||
relops1
|
relops1
|
||||||
relops2
|
relops2
|
||||||
setops1
|
|
||||||
setops2
|
|
||||||
)
|
)
|
||||||
boost_geometry_add_unit_test("cs_undefined" ${item})
|
boost_geometry_add_unit_test("cs_undefined" ${item})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
boost_geometry_add_unit_test("cs_undefined" setops1 "not_run")
|
||||||
|
boost_geometry_add_unit_test("cs_undefined" setops2 "not_run")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user