mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
Rely on CMake to figure out proper compile flags for C++11
This commit is contained in:
@@ -197,21 +197,9 @@ find_package(Qt5LinguistTools REQUIRED)
|
|||||||
set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}")
|
set(QT_RCC_EXECUTABLE "${Qt5Core_RCC_EXECUTABLE}")
|
||||||
# FIXME: CrashReporter depends on deprecated QHttp
|
# FIXME: CrashReporter depends on deprecated QHttp
|
||||||
|
|
||||||
include(CheckCXXCompilerFlag)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
check_cxx_compiler_flag( "-std=c++11" CXX11_FOUND )
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
check_cxx_compiler_flag( "-std=c++0x" CXX0X_FOUND )
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
check_cxx_compiler_flag( "-stdlib=libc++" LIBCPP_FOUND )
|
|
||||||
if(CXX11_FOUND)
|
|
||||||
tomahawk_add_cxx_flags( "-std=c++11" )
|
|
||||||
elseif(CXX0X_FOUND)
|
|
||||||
tomahawk_add_cxx_flags( "-std=c++0x" )
|
|
||||||
else()
|
|
||||||
message(STATUS "${CMAKE_CXX_COMPILER} does not support C++11, please use a
|
|
||||||
different compiler")
|
|
||||||
endif()
|
|
||||||
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR APPLE) AND LIBCPP_FOUND)
|
|
||||||
tomahawk_add_cxx_flags( "-stdlib=libc++" )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(Boost REQUIRED COMPONENTS filesystem system)
|
find_package(Boost REQUIRED COMPONENTS filesystem system)
|
||||||
macro_log_feature(Boost_FOUND "Boost" "Provides free peer-reviewed portable C++ source libraries" "http://www.boost.org" TRUE "" "") #FIXME: give useful explanation
|
macro_log_feature(Boost_FOUND "Boost" "Provides free peer-reviewed portable C++ source libraries" "http://www.boost.org" TRUE "" "") #FIXME: give useful explanation
|
||||||
|
Reference in New Issue
Block a user