Avoid using different C++ standard depending on building options

This commit is contained in:
Carles Fernandez 2020-06-11 14:24:12 +02:00
parent 65a25a47c5
commit e8f8097b04
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
1 changed files with 7 additions and 9 deletions

View File

@ -540,15 +540,13 @@ 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))
if(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()
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(${FILESYSTEM_FOUND})
if(CMAKE_VERSION VERSION_LESS 3.13)
set(CMAKE_CXX_STANDARD 17)