Guest User

Untitled

a guest
Nov 23rd, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 0.46 KB | None | 0 0
  1.  
  2. include(CheckCXXCompilerFlag)
  3. CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
  4. CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
  5. if(COMPILER_SUPPORTS_CXX1Y)
  6.   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
  7. elseif(COMPILER_SUPPORTS_CXX0X)
  8.   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
  9. else()
  10.         message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler.")
  11. endif()
Advertisement
Add Comment
Please, Sign In to add comment