Skip to content

Commit

Permalink
Remove CheckCXX11Features Usage
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ChristianTackeGSI authored and dennisklein committed Apr 13, 2022
1 parent 13cd9f4 commit 59e6f25
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 35 deletions.
11 changes: 0 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 0 additions & 12 deletions templates/project_root_containers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
12 changes: 0 additions & 12 deletions templates/project_stl_containers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 59e6f25

Please sign in to comment.