Skip to content

Commit

Permalink
Set CXX_STANDARD in a way that allows for a higher standard having be…
Browse files Browse the repository at this point in the history
…en set.
  • Loading branch information
gsrohde committed Apr 6, 2024
1 parent 3d48f89 commit cf923f9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ if(MESSAGE_LOG_LEVEL IN_LIST LOG_LEVELS_FOR_INDENTATION)
endif()


set(CMAKE_CXX_STANDARD 14) # probably not needed if GTest is found
# May not be needed. Linking a target with gtest_main or gmock seems
# to force C++14 to be used regardless.
if(CMAKE_CXX_STANDARD LESS 14)
message(VERBOSE "GoogleTest requires at least C++14")
set(CMAKE_CXX_STANDARD 14)
endif()

# Get GoogleTest if we don't have it:
include(FetchContent)
Expand All @@ -18,11 +23,6 @@ FetchContent_Declare(
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)

add_custom_target(blah ALL
COMMAND ls -l test_all > test_all_info
)
#add_dependencies(blah test_all)


add_executable(test_all
test_regression.cpp
Expand Down

0 comments on commit cf923f9

Please sign in to comment.