From c95fddc28cec00ecd3388f8662fdaff18b2d882e Mon Sep 17 00:00:00 2001 From: Christian Tacke <58549698+ChristianTackeGSI@users.noreply.github.com> Date: Thu, 24 Jun 2021 14:38:26 +0200 Subject: [PATCH] Remove CheckCXX11Features Usage FairRoot depends on a C++11 compiler. This is fully declared and enforced using CMake native tooling. CheckCXX11Features is not used at all any more. So remove all of its usage in CMakeLists.txt. Also remove it from the templates. --- CMakeLists.txt | 11 ----------- templates/project_root_containers/CMakeLists.txt | 12 ------------ templates/project_stl_containers/CMakeLists.txt | 12 ------------ 3 files changed, 35 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4bc83ee1f3..6fdfe0240b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,19 +84,8 @@ endif() SET(VMCWORKDIR ${CMAKE_SOURCE_DIR}/examples) -# Check if the compiler support specific C++11 features -# Up to now this is only a check since the code does not use -# any of the features of the new standard -Set(CheckSrcDir "${CMAKE_SOURCE_DIR}/cmake/checks") -include(CheckCXX11Features) include(CheckSymbolExists) -# FairRoot only uses C++11 or later, so we need an compiler which supports C++11 -# Check if the used compiler support C++11. If not stop with an error message -If(NOT _HAS_CXX11_FLAG) - Message(FATAL_ERROR "The used C++ compiler (${CMAKE_CXX_COMPILER}) does not support C++11. CbmRoot can only be compiled with compilers supporting C++11. Please install such a compiler.") -EndIf() - # Load some basic macros which are needed later on include(FairMacros) include(WriteConfigFile) diff --git a/templates/project_root_containers/CMakeLists.txt b/templates/project_root_containers/CMakeLists.txt index a021e82a11..9b048abaa9 100644 --- a/templates/project_root_containers/CMakeLists.txt +++ b/templates/project_root_containers/CMakeLists.txt @@ -34,8 +34,6 @@ SET(FAIRROOTPATH $ENV{FAIRROOTPATH}) set(CMAKE_MODULE_PATH "${FAIRROOTPATH}/share/fairbase/cmake/modules_old" ${CMAKE_MODULE_PATH}) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH}) -Set(CheckSrcDir "${FAIRROOTPATH}/share/fairbase/cmake/checks") - find_package(FairRoot) # Load some basic macros which are needed later on @@ -155,16 +153,6 @@ SET(_LIBDIR ${CMAKE_BINARY_DIR}/lib) SET(LD_LIBRARY_PATH ${_LIBDIR} ${LD_LIBRARY_PATH}) - -# Check if the compiler support specific C++11 features -# Up to now this is only a check since the code does not use -# any of the features of the new standard -include(CheckCXX11Features) - -IF(HAS_CXX11_SHAREDPOINTER) - Add_Definitions(-DHAS_SHAREDPOINTER) -ENDIF(HAS_CXX11_SHAREDPOINTER) - # Recurse into the given subdirectories. This does not actually # cause another cmake executable to run. The same process will walk through # the project's entire directory structure. diff --git a/templates/project_stl_containers/CMakeLists.txt b/templates/project_stl_containers/CMakeLists.txt index a021e82a11..9b048abaa9 100644 --- a/templates/project_stl_containers/CMakeLists.txt +++ b/templates/project_stl_containers/CMakeLists.txt @@ -34,8 +34,6 @@ SET(FAIRROOTPATH $ENV{FAIRROOTPATH}) set(CMAKE_MODULE_PATH "${FAIRROOTPATH}/share/fairbase/cmake/modules_old" ${CMAKE_MODULE_PATH}) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH}) -Set(CheckSrcDir "${FAIRROOTPATH}/share/fairbase/cmake/checks") - find_package(FairRoot) # Load some basic macros which are needed later on @@ -155,16 +153,6 @@ SET(_LIBDIR ${CMAKE_BINARY_DIR}/lib) SET(LD_LIBRARY_PATH ${_LIBDIR} ${LD_LIBRARY_PATH}) - -# Check if the compiler support specific C++11 features -# Up to now this is only a check since the code does not use -# any of the features of the new standard -include(CheckCXX11Features) - -IF(HAS_CXX11_SHAREDPOINTER) - Add_Definitions(-DHAS_SHAREDPOINTER) -ENDIF(HAS_CXX11_SHAREDPOINTER) - # Recurse into the given subdirectories. This does not actually # cause another cmake executable to run. The same process will walk through # the project's entire directory structure.