Skip to content

Commit

Permalink
Merge pull request #123 from thbeu/set-c++-standard
Browse files Browse the repository at this point in the history
Prefer target property to set C++ standard
  • Loading branch information
rouault authored Mar 24, 2024
2 parents 3f13de8 + 949fced commit fefaa0c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

project(${CMAKE_PROJECT_NAME}Tests CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Set up GoogleTest
include(FetchContent)

Expand All @@ -27,5 +24,6 @@ foreach(executable dbf_test sbn_test)
COMMAND ${executable}
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
)
set_target_properties(${executable} PROPERTIES FOLDER "tests")
target_compile_features(${executable} PUBLIC cxx_std_17)
set_target_properties(${executable} PROPERTIES FOLDER "tests" CXX_EXTENSIONS OFF)
endforeach()

0 comments on commit fefaa0c

Please sign in to comment.