Skip to content

Commit 03b7b1c

Browse files
committed
use c++17 for yaml-cpp due to dpcpp
1 parent 3e16775 commit 03b7b1c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

extensions/test/config/CMakeLists.txt

+8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ if(NOT yaml-cpp_FOUND)
77
GIT_TAG 0.8.0
88
)
99

10+
# Turn off additional tool in yaml-cpp
11+
# We change the standard of yaml-cpp. Without this, we will need to change the standard of tool targets additionally.
12+
set(YAML_CPP_BUILD_TOOLS OFF CACHE INTERNAL "")
13+
1014
FetchContent_MakeAvailable(yaml-cpp)
1115
# make sure the tests DLLs are placed in the working path for CTest
1216
set_target_properties(
@@ -16,6 +20,10 @@ if(NOT yaml-cpp_FOUND)
1620
ARCHIVE_OUTPUT_DIRECTORY "${GINKGO_LIBRARY_PATH}"
1721
LIBRARY_OUTPUT_DIRECTORY "${GINKGO_LIBRARY_PATH}"
1822
)
23+
24+
# The default standard c++11, which introduces an issue on dpcpp compiler.
25+
# We set the default to c++17 as Ginkgo
26+
set_target_properties(yaml-cpp PROPERTIES CXX_STANDARD 17)
1927
endif()
2028
ginkgo_create_test(json_config ADDITIONAL_LIBRARIES nlohmann_json::nlohmann_json)
2129
ginkgo_create_test(yaml_config ADDITIONAL_LIBRARIES yaml-cpp::yaml-cpp)

0 commit comments

Comments
 (0)