File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,21 @@ SET(CMAKE_BUILD_TYPE RelWithDebInfo)
55
66SET (MY_DIR ${libfreenect2_SOURCE_DIR} )
77
8+ OPTION (ENABLE_CXX11 "Enable C++11 support" OFF )
9+
10+ IF (ENABLE_CXX11)
11+ INCLUDE (CheckCXXCompilerFlag)
12+ CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
13+ CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
14+ IF (COMPILER_SUPPORTS_CXX11)
15+ SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
16+ ELSEIF (COMPILER_SUPPORTS_CXX0X)
17+ SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x" )
18+ ELSE ()
19+ MESSAGE (STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler." )
20+ ENDIF ()
21+ ENDIF (ENABLE_CXX11)
22+
823# additional cmake modules
924LIST (APPEND CMAKE_MODULE_PATH ${MY_DIR} /cmake_modules)
1025
You can’t perform that action at this time.
0 commit comments