mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 19:30:21 +02:00
Use correct C++11 flag for the compiler.
This commit is contained in:
@@ -238,6 +238,18 @@ if( BUILD_GUI AND UNIX AND NOT APPLE )
|
|||||||
find_package( X11 )
|
find_package( X11 )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
include(CheckCXXCompilerFlag)
|
||||||
|
check_cxx_compiler_flag( "-std=c++11" CXX11_FOUND )
|
||||||
|
check_cxx_compiler_flag( "-std=c++0x" CXX0X_FOUND )
|
||||||
|
if(CXX11_FOUND)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
|
elseif(CXX0X_FOUND)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||||
|
else()
|
||||||
|
message(STATUS "${CMAKE_CXX_COMPILER} does not support C++11, please use a
|
||||||
|
different compiler")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Check if we can use <functional> or need <tr1/functional>
|
# Check if we can use <functional> or need <tr1/functional>
|
||||||
include( CheckStdFunctional )
|
include( CheckStdFunctional )
|
||||||
check_std_functional( CXX_STD_FUNCTIONAL )
|
check_std_functional( CXX_STD_FUNCTIONAL )
|
||||||
|
Reference in New Issue
Block a user