From 746e78d01e1642788c2287b92c4352df5f4558c7 Mon Sep 17 00:00:00 2001 From: Davide Gerhard Date: Mon, 4 Nov 2019 08:18:26 +0100 Subject: [PATCH] fix boost component and c++11 usage --- CMakeLists.txt | 9 ++++++--- lib/CMakeLists.txt | 2 -- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9267e43..24d853f 100644 --- CMakeLists.txt +++ CMakeLists.txt @@ -86,8 +86,8 @@ set(Boost_ADDITIONAL_VERSIONS "1.55.0" "1.55" "1.56.0" "1.56" "1.57.0" "1.57" "1.58.0" "1.58" "1.59.0" "1.59" "1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64" "1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69" -) -find_package(Boost "1.35" COMPONENTS filesystem system) + ) +find_package(Boost "1.35" COMPONENTS chrono filesystem system thread) if(NOT Boost_FOUND) message(FATAL_ERROR "Boost required to compile sdrplay") @@ -145,7 +145,10 @@ find_package(Gnuradio "3.7.2" REQUIRED) list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules) include(GrVersion) -add_definitions(-std=c++11) +set(CMAKE_CXX_STANDARD 11) +if(${CMAKE_VERSION} VERSION_LESS "3.1") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++${CMAKE_CXX_STANDARD}") +endif() if(NOT CPPUNIT_FOUND) message(FATAL_ERROR "CppUnit required to compile sdrplay") diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e8be177..d977246 100644 --- lib/CMakeLists.txt +++ lib/CMakeLists.txt @@ -22,9 +22,7 @@ # Setup library ######################################################################## include(GrPlatform) #define LIB_SUFFIX -include(GrBoost) -add_definitions(-std=c++11) include_directories(${Boost_INCLUDE_DIR}) link_directories(${Boost_LIBRARY_DIRS}) -- 2.22.0