Set C++ standard to 14 if linking against GPSTk with gcc

This commit is contained in:
Carles Fernandez 2020-04-22 11:09:06 +02:00
parent b78bbdf555
commit 2b257f87d7
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
1 changed files with 11 additions and 7 deletions

View File

@ -533,13 +533,17 @@ set(FILESYSTEM_FOUND FALSE)
if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17)
# Check if we have std::filesystem
if(NOT (CMAKE_VERSION VERSION_LESS 3.8))
find_package(FILESYSTEM COMPONENTS Final Experimental)
set_package_properties(FILESYSTEM PROPERTIES
URL "https://en.cppreference.com/w/cpp/filesystem"
DESCRIPTION "Provides facilities for performing operations on file systems and their components"
PURPOSE "Work with paths, regular files, and directories."
TYPE OPTIONAL
)
if((NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))
OR NOT (ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA))
# Fix for GPTSk
find_package(FILESYSTEM COMPONENTS Final Experimental)
set_package_properties(FILESYSTEM PROPERTIES
URL "https://en.cppreference.com/w/cpp/filesystem"
DESCRIPTION "Provides facilities for performing operations on file systems and their components"
PURPOSE "Work with paths, regular files, and directories."
TYPE OPTIONAL
)
endif()
if(${FILESYSTEM_FOUND})
if(CMAKE_VERSION VERSION_LESS 3.13)
set(CMAKE_CXX_STANDARD 17)