File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,6 @@ endif()
14
14
15
15
include (${CMAKE_BINARY_DIR} /conan.cmake)
16
16
17
- set (CMAKE_CXX_STANDARD 17)
18
- set (CMAKE_CXX_STANDARD_REQUIRED ON )
19
-
20
17
set (LIBS_DIR ${CMAKE_CURRENT_BINARY_DIR} /libs)
21
18
set (EIGEN_MATIO_URL https://raw.githubusercontent.com/tesch1/eigen-matio/master/MATio)
22
19
set (EIGEN_MATIO_DIR ${LIBS_DIR} /include )
@@ -48,6 +45,8 @@ find_package(Eigen3 REQUIRED)
48
45
add_library (example STATIC src/example.cpp include /example.hpp)
49
46
target_include_directories (example PRIVATE ${EIGEN_MATIO_DIR} )
50
47
target_link_libraries (example PRIVATE matio::matio Eigen3::Eigen)
48
+ target_compile_features (example PUBLIC cxx_std_17)
49
+ set_target_properties (example PROPERTIES CXX_EXTENSIONS OFF )
51
50
52
51
enable_testing ()
53
52
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ foreach(file ${TEST_SOURCES})
27
27
add_executable (${test_name} _Tests ${file} )
28
28
target_include_directories (${test_name} _Tests PRIVATE "${CMAKE_SOURCE_DIR} /include" )
29
29
target_link_libraries (${test_name} _Tests PRIVATE example GTest::GTest)
30
+ target_compile_features (${test_name} _Tests PUBLIC cxx_std_17)
31
+ set_target_properties (${test_name} _Tests PROPERTIES CXX_EXTENSIONS OFF )
30
32
gtest_add_tests(
31
33
TARGET ${test_name} _Tests
32
34
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR} /test" )
You can’t perform that action at this time.
0 commit comments