IAP GITLAB

Commit e038393b authored by Colin Baus's avatar Colin Baus

add a test if c++11 can be turned on

git-svn-id: https://devel-ik.fzk.de/svn/mc/crmc/trunk@4942 c7a5e08c-de06-0410-9364-b41cf42a0b17
parent daab5c86
......@@ -68,6 +68,18 @@ IF("${isSystemDir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
ENDIF("${isSystemDir}" STREQUAL "-1")
## check for c++11 support
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please consider updating your C++ compiler.")
endif()
## find packages
SET (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules" CACHE PATH "Module Path" FORCE)
......@@ -300,4 +312,3 @@ ADD_TEST (crmcRuns bin/crmc -o hepmc -f ctest.hepmc -T 1)
#ADD_TEST (crmcCheckFile md5sum "ctest.hepmc")
#SET_TESTS_PROPERTIES (crmcCheckFile PROPERTIES PASS_REGULAR_EXPRESSION ".*777cb7e60b7c8104393a4fb22b137538 ctest.hepmc")
ADD_TEST (crmcRemoveFile rm "ctest.hepmc")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment