From b52cf0c134047b25557c3d3c2793334708e90c82 Mon Sep 17 00:00:00 2001
From: Riccardo Maria Bianchi <riccardo.maria.bianchi@cern.ch>
Date: Thu, 20 Oct 2022 12:02:54 +0200
Subject: [PATCH] Print info about build type and C++ standard

---
 GeoModelG4/CMakeLists.txt            | 4 ++++
 GeoModelTools/CMakeLists.txt         | 4 ++++
 GeoModelVisualization/CMakeLists.txt | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/GeoModelG4/CMakeLists.txt b/GeoModelG4/CMakeLists.txt
index 0d1c6e7b0..128f647f3 100644
--- a/GeoModelG4/CMakeLists.txt
+++ b/GeoModelG4/CMakeLists.txt
@@ -18,6 +18,8 @@ if( (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) OR GEOMODEL_BUILD_GEOMODELG4_
     include( cmake_colors_defs )
     # Warn the users about what they are doing
     message(STATUS "${BoldGreen}Building ${PROJECT_NAME} individually, as a top-level project.${ColourReset}")
+    # Set a default build type
+    include( BuildType )
     # Set default build and C++ options
     include( configure_cpp_options )
     set( CMAKE_FIND_FRAMEWORK "LAST" CACHE STRING
@@ -31,6 +33,8 @@ if( (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) OR GEOMODEL_BUILD_GEOMODELG4_
     endif()
     # Set a flag to steer the  of the subpackages
     set( ${PROJECT_NAME}_INDIVIDUAL_BUILD ON )
+    # Print Build Info on screen
+    include( PrintBuildInfo )
 else()
     # I am called from other projects with add_subdirectory().
     message( STATUS "Building ${PROJECT_NAME} as part of the root GeoModel project.")
diff --git a/GeoModelTools/CMakeLists.txt b/GeoModelTools/CMakeLists.txt
index 3c29cb7ad..738f05fcc 100644
--- a/GeoModelTools/CMakeLists.txt
+++ b/GeoModelTools/CMakeLists.txt
@@ -19,6 +19,8 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
     include( cmake_colors_defs )
     # Warn the users about what they are doing
     message(STATUS "${BoldGreen}Building ${PROJECT_NAME} individually, as a top-level project.${ColourReset}")
+    # Set a default build type
+    include( BuildType )
     # Set default build and C++ options
     include( configure_cpp_options )
     set( CMAKE_FIND_FRAMEWORK "LAST" CACHE STRING
@@ -36,6 +38,8 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
     find_package( GeoModelIO REQUIRED ${GeoModel_VERSION} ) 
     # Set a flag to steer the build of the subpackages
     #set( VISUALIZATION_INDIVIDUAL_BUILD ON )
+    # Print Build Info on screen
+    include( PrintBuildInfo )
 else()
     # I am called from other project with add_subdirectory().
     message( STATUS "Building ${PROJECT_NAME} as part of the root GeoModel project.")
diff --git a/GeoModelVisualization/CMakeLists.txt b/GeoModelVisualization/CMakeLists.txt
index 6ba88d176..054444a47 100644
--- a/GeoModelVisualization/CMakeLists.txt
+++ b/GeoModelVisualization/CMakeLists.txt
@@ -24,6 +24,8 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
     include( cmake_colors_defs )
     # Warn the users about what they are doing
     message(STATUS "${BoldGreen}Building ${PROJECT_NAME} individually, as a top-level project.${ColourReset}")
+    # Set a default build type
+    include( BuildType )
     # Set default build and C++ options
     include( configure_cpp_options )
     set( CMAKE_FIND_FRAMEWORK "LAST" CACHE STRING
@@ -33,6 +35,8 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
     find_package( GeoModelIO REQUIRED ${GeoModel_VERSION} )
     # Set a flag to steer the build of the subpackages
     set( VISUALIZATION_INDIVIDUAL_BUILD ON )
+    # Print Build Info on screen
+    include( PrintBuildInfo )
 else()
     # I am called from other project with add_subdirectory().
     message( STATUS "Building ${PROJECT_NAME} as part of the root GeoModel project.")
-- 
GitLab