From d80eff1af25a1ecf03b26fba75ffd7ad1eccf8f4 Mon Sep 17 00:00:00 2001 From: Kent Slaney Date: Tue, 6 Feb 2024 11:19:31 -0800 Subject: [PATCH] add c++ std flags --- setup.py | 1 + tests/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index afc15c1d..37dba363 100644 --- a/setup.py +++ b/setup.py @@ -22,6 +22,7 @@ "-DMC_USE_SMALL_VECTOR", "-O3", "-DNDEBUG", + "-std=c++17", ] diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9af3d51e..9f301081 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,7 +2,7 @@ file(GLOB TEST_SRC_FILES ${PROJECT_SOURCE_DIR}/tests/test_*.cpp) foreach(SRC ${TEST_SRC_FILES}) get_filename_component(test_name ${SRC} NAME_WE) - set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS "-fexceptions") + set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS "-fexceptions -std=c++17") add_executable(${test_name} ${SRC}) add_dependencies(${test_name} gtest) target_link_libraries(${test_name}