Browse Source

Proper detection for G++ and Clang.

Darryl Pogue 12 years ago
parent
commit
c44008a10d
  1. 14
      CMakeLists.txt

14
CMakeLists.txt

@ -1,6 +1,16 @@
project(Plasma) project(Plasma)
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
# Detect Clang compiler
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_COMPILER_IS_CLANGXX 1)
endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# Require C++11
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()
# HeadSpin Configuration # HeadSpin Configuration
if(WIN32 AND NOT CYGWIN) if(WIN32 AND NOT CYGWIN)
add_definitions(-DHS_BUILD_FOR_WIN32) add_definitions(-DHS_BUILD_FOR_WIN32)
@ -8,10 +18,6 @@ endif(WIN32 AND NOT CYGWIN)
if(UNIX) if(UNIX)
add_definitions(-DHS_BUILD_FOR_UNIX) add_definitions(-DHS_BUILD_FOR_UNIX)
endif(UNIX) endif(UNIX)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-std=c++0x)
endif()
# End HeadSpin Configuration # End HeadSpin Configuration
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

Loading…
Cancel
Save