diff --git a/cmake/BuildType.cmake b/cmake/BuildType.cmake index 14a12a8ccc0c22511e31288d7ab3b4fea69fb561..ac66a37a7ee18d873e34487b35740b9178027783 100644 --- a/cmake/BuildType.cmake +++ b/cmake/BuildType.cmake @@ -14,15 +14,9 @@ set(default_build_type "Release") # endif() if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - if( COLOR_DEFS ) - message(STATUS "${Blue}INFO: Setting build type to '${default_build_type}' as none was specified.${ColourReset}") - else() - message(STATUS "INFO: Setting build type to '${default_build_type}' as none was specified.") - endif() - set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE - STRING "Choose the type of build." FORCE) + message(STATUS "${Blue}INFO: Setting build type to '${default_build_type}' as none was specified.${ColourReset}") + set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE) # Set the possible values of build type for cmake-gui - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS - "Debug" "Release" "MinSizeRel" "RelWithDebInfo") + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") endif() diff --git a/cmake/PrintBuildInfo.cmake b/cmake/PrintBuildInfo.cmake index 862a34b45c7506c83a229d7ef71ff604d182acb6..68d6ac021630eea3a87ec51a01544965cd7238a6 100644 --- a/cmake/PrintBuildInfo.cmake +++ b/cmake/PrintBuildInfo.cmake @@ -1,13 +1,6 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -if( COLOR_DEFS ) - message(STATUS "-----") - message(STATUS "${BoldYellow}Building with type: ${CMAKE_BUILD_TYPE}${ColourReset}") - message(STATUS "${BoldYellow}Using C++ standard: ${CMAKE_CXX_STANDARD}${ColourReset}") - message(STATUS "-----") -else() - message(STATUS "-----") - message(STATUS "Building with type: ${CMAKE_BUILD_TYPE}") - message(STATUS "Using C++ standard: ${CMAKE_CXX_STANDARD}") - message(STATUS "-----") -endif() +message(STATUS "-----") +message(STATUS "${BoldYellow}Building with type: ${CMAKE_BUILD_TYPE}${ColourReset}") +message(STATUS "${BoldYellow}Using C++ standard: ${CMAKE_CXX_STANDARD}${ColourReset}") +message(STATUS "-----") diff --git a/cmake/SetupCoin3D.cmake b/cmake/SetupCoin3D.cmake index d8372de2a0ac68c3e97a7df3bbf6891cc06dbe2b..98d818f55d62689c87acbffa67c1077e43d6a3dc 100644 --- a/cmake/SetupCoin3D.cmake +++ b/cmake/SetupCoin3D.cmake @@ -20,11 +20,7 @@ option( GEOMODEL_USE_BUILTIN_COIN3D if( GEOMODEL_USE_BUILTIN_COIN3D ) # Tell the user what's happening. - if( COLOR_DEFS ) - message( STATUS "${BoldMagenta}'GEOMODEL_USE_BUILTIN_COIN3D' was set to 'true' ==> Building Coin and SoQt as part of the project${ColourReset}" ) - else() - message( STATUS "'GEOMODEL_USE_BUILTIN_COIN3D' was set to 'true' ==> Building Coin and SoQt as part of the project" ) - endif() + message( STATUS "${BoldMagenta}'GEOMODEL_USE_BUILTIN_COIN3D' was set to 'true' ==> Building Coin and SoQt as part of the project${ColourReset}" ) # External(s) required for the build. find_package( Boost REQUIRED ) diff --git a/cmake/SetupJSON.cmake b/cmake/SetupJSON.cmake index 3e6312b0df7f06bdcf1279e756def2a540da9ae9..a516cde54638058bee2aec199d00a2df564f0acd 100644 --- a/cmake/SetupJSON.cmake +++ b/cmake/SetupJSON.cmake @@ -21,11 +21,7 @@ option( GEOMODEL_USE_BUILTIN_JSON if( GEOMODEL_USE_BUILTIN_JSON ) # Tell the user what's happening. - if( COLOR_DEFS ) - message( STATUS "${BoldMagenta}'GEOMODEL_USE_BUILTIN_JSON' was set to 'true' ==> Building nlohmann_json as part of the project${ColourReset}" ) - else() - message( STATUS "'GEOMODEL_USE_BUILTIN_JSON' was set to 'true' ==> Building nlohmann_json as part of the project" ) - endif() + message( STATUS "${BoldMagenta}'GEOMODEL_USE_BUILTIN_JSON' was set to 'true' ==> Building nlohmann_json as part of the project${ColourReset}" ) # The include directory and library that will be produced. set( nlohmann_json_INCLUDE_DIR diff --git a/cmake/SetupXercesC.cmake b/cmake/SetupXercesC.cmake index da6ec6fda361b2fd23da6cbe07b0cbabc3542f2a..e42cb94c00759e9fee3fbecd9a3145cfcca74ce4 100644 --- a/cmake/SetupXercesC.cmake +++ b/cmake/SetupXercesC.cmake @@ -20,16 +20,12 @@ option( GEOMODEL_USE_BUILTIN_XERCESC if( GEOMODEL_USE_BUILTIN_XERCESC ) # Tell the user what's happening. - if( COLOR_DEFS ) - message( STATUS "${BoldMagenta}'GEOMODEL_USE_BUILTIN_XERCESC' was set to 'true' ==> Building XercesC as part of the project${ColourReset}" ) - else() - message( STATUS "'GEOMODEL_USE_BUILTIN_XERCESC' was set to 'true' ==> Building XercesC as part of the project" ) - endif() + message( STATUS "${BoldMagenta}'GEOMODEL_USE_BUILTIN_XERCESC' was set to 'true' ==> Building XercesC as part of the project${ColourReset}" ) # The include directory and library that will be produced. set( XercesC_INCLUDE_DIR "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/XercesCInstall/${CMAKE_INSTALL_INCLUDEDIR}" CACHE PATH "Path to the Xerces-C include directory" FORCE ) - set( XercesC_INCLUDE_DIRS "${XercesC_INCLUDE_DIR}" ) + set( XercesC_INCLUDE_DIRS "${XercesC_INCLUDE_DIR}" ) set( XercesC_LIBRARY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/XercesCInstall/lib/${CMAKE_SHARED_LIBRARY_PREFIX}xerces-c${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE PATH "Path to the Xerces-C library file" FORCE ) set( XercesC_LIBRARIES "${XercesC_LIBRARY}" ) diff --git a/cmake/configure_cpp_options.cmake b/cmake/configure_cpp_options.cmake index 9a6cc8a7902de8bd14d412f0ca4fc86a3bc116fc..4b7db9d2889a3a772d386c8fcf648c311cc1b5a7 100644 --- a/cmake/configure_cpp_options.cmake +++ b/cmake/configure_cpp_options.cmake @@ -18,8 +18,7 @@ set( CMAKE_BUILD_TYPE "Release" CACHE STRING "CMake build mode to use" ) set( CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard used for the build" ) set( CMAKE_CXX_EXTENSIONS FALSE CACHE BOOL "(Dis)allow using GNU extensions" ) -set( CMAKE_CXX_STANDARD_REQUIRED TRUE CACHE BOOL - "Require the specified C++ standard for the build" ) +set( CMAKE_CXX_STANDARD_REQUIRED TRUE CACHE BOOL "Require the specified C++ standard for the build" ) # Setting CMAKE_CXX_FLAGS to avoid "deprecated" warnings set(CMAKE_CXX_FLAGS "-Wno-deprecated-declarations" ) # very basic @@ -28,7 +27,6 @@ set(CMAKE_CXX_FLAGS "-Wno-deprecated-declarations" ) # very basic #set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror -pedantic-errors" ) # better for an even more severe check #set(CMAKE_CXX_FLAGS "-Weverything -Werror -pedantic-errors" ) # not recommended, it warns for really EVERYTHING! - # TODO: for Debug and with GCC, do we want to set the flags below by default? # set( CMAKE_BUILD_TYPE DEBUG ) # set(CMAKE_CXX_FLAGS "-fPIC -O0 -g -gdwarf-2" )