Skip to content

Commit f1007d3

Browse files
committed
..aaaaand for the unit tests
why does everything include this by now
1 parent 960890b commit f1007d3

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

share/picongpu/unit/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ add_library(argparser
112112
target_link_libraries(argparser PRIVATE ${HOST_LIBS})
113113
target_link_libraries(argparser PRIVATE pmacc::pmacc)
114114

115+
# Workaround for this bug https://github.com/nlohmann/json/issues/3907
116+
# We don't need ranges in <nlohmann/json.hpp>
117+
target_compile_definitions(argparser PRIVATE JSON_HAS_RANGES=0)
118+
115119
# Add subdirectories for tests
116120
add_subdirectory(dimensional_tests)
117121
add_subdirectory(non_dimensional_tests)

share/picongpu/unit/dimensional_tests/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ foreach(dim 2 3)
66
string(REPLACE "UT.cpp" "" testCase ${testCaseFilename})
77
set(testExe "${PROJECT_NAME}-${testCase}-${dim}D")
88
alpaka_add_executable(${testExe} ${testCaseFilepath})
9+
# Workaround for this bug https://github.com/nlohmann/json/issues/3907
10+
# We don't need ranges in <nlohmann/json.hpp>
11+
target_compile_definitions(${testExe} PRIVATE JSON_HAS_RANGES=0)
912
target_compile_definitions(${testExe} PRIVATE TEST_DIM=${dim})
1013
target_link_libraries(${testExe} PUBLIC Catch2 Catch2WithMain)
1114
target_link_libraries(${testExe} PRIVATE pmacc::pmacc)

share/picongpu/unit/non_dimensional_tests/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ foreach(testCaseFilepath ${NON_DIMENSIONAL_TESTS})
55
string(REPLACE "UT.cpp" "" testCase ${testCaseFilename})
66
set(testExe "${PROJECT_NAME}-${testCase}")
77
alpaka_add_executable(${testExe} ${testCaseFilepath})
8+
# Workaround for this bug https://github.com/nlohmann/json/issues/3907
9+
# We don't need ranges in <nlohmann/json.hpp>
10+
target_compile_definitions(${testExe} PRIVATE JSON_HAS_RANGES=0)
811
target_link_libraries(${testExe} PUBLIC Catch2 Catch2WithMain)
912
target_link_libraries(${testExe} PRIVATE pmacc::pmacc)
1013
if(${testExe} MATCHES ".*CLI.*")

0 commit comments

Comments
 (0)