json/test/cmake_fetch_content2/CMakeLists.txt
Niels Lohmann c6d8892e5d
FetchContent_MakeAvailable (#3351)
* 🔧 use FetchContent_MakeAvailable

* 💚 fix test names
2022-03-06 15:33:05 +01:00

21 lines
688 B
CMake

if (${CMAKE_VERSION} VERSION_GREATER "3.14.0")
add_test(NAME cmake_fetch_content2_configure
COMMAND ${CMAKE_COMMAND}
-G "${CMAKE_GENERATOR}"
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-Dnlohmann_json_source=${PROJECT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/project
)
add_test(NAME cmake_fetch_content2_build
COMMAND ${CMAKE_COMMAND} --build .
)
set_tests_properties(cmake_fetch_content2_configure PROPERTIES
FIXTURES_SETUP cmake_fetch_content2
LABELS "git_required;not_reproducible"
)
set_tests_properties(cmake_fetch_content2_build PROPERTIES
FIXTURES_REQUIRED cmake_fetch_content2
LABELS "git_required;not_reproducible"
)
endif()