From 71d70335de08fcde06e636edefecd5c98f23e778 Mon Sep 17 00:00:00 2001 From: adrien-matta <a.matta@surrey.ac.uk> Date: Wed, 12 Oct 2016 09:29:17 +0200 Subject: [PATCH] * Fixing CMake Policy on Mac Os X - The policy cannot be set inside an included file --- Examples/Example1/CMakeLists.txt | 3 +++ Examples/Example2/CMakeLists.txt | 3 +++ NPLib/CMakeLists.txt | 10 +++++++--- NPSimulation/CMakeLists.txt | 4 ++++ Projects/BeLise/CMakeLists.txt | 3 +++ Projects/ComptonTelescope/CMakeLists.txt | 3 +++ Projects/Helios/CMakeLists.txt | 3 +++ Projects/Lassa/CMakeLists.txt | 3 +++ Projects/MUGAST/CMakeLists.txt | 3 +++ Projects/Nana/CMakeLists.txt | 3 +++ Projects/S1554/CMakeLists.txt | 3 +++ Projects/SPcoincW1/CMakeLists.txt | 3 +++ Projects/Sharc/CMakeLists.txt | 3 +++ Projects/SharcEfficiency/CMakeLists.txt | 3 +++ Projects/T40/CMakeLists.txt | 3 +++ Projects/TRex_Miniball/CMakeLists.txt | 3 +++ Projects/e644pd/CMakeLists.txt | 3 +++ Projects/new/CMakeLists.txt | 3 +++ 18 files changed, 59 insertions(+), 3 deletions(-) diff --git a/Examples/Example1/CMakeLists.txt b/Examples/Example1/CMakeLists.txt index 6806d778c..22c74affd 100644 --- a/Examples/Example1/CMakeLists.txt +++ b/Examples/Example1/CMakeLists.txt @@ -1,2 +1,5 @@ cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/Examples/Example2/CMakeLists.txt b/Examples/Example2/CMakeLists.txt index 6806d778c..22c74affd 100644 --- a/Examples/Example2/CMakeLists.txt +++ b/Examples/Example2/CMakeLists.txt @@ -1,2 +1,5 @@ cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/NPLib/CMakeLists.txt b/NPLib/CMakeLists.txt index 6c7f6446c..e4d38fb00 100644 --- a/NPLib/CMakeLists.txt +++ b/NPLib/CMakeLists.txt @@ -3,6 +3,13 @@ include(CheckCXXCompilerFlag) project(NPLib CXX) set(CMAKE_BUILD_TYPE Release) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) + +# include the nptool standard CMake preamble +include("ressources/CMake/NPTool_CMake_Preamble.cmake") + + # Major change in the Core/Physics (affecting the detector/analysis/simulation) set(NPLIB_VERSION_MAJOR 2) # Minor change in the Core/Physics (not affecting any other part) @@ -20,9 +27,6 @@ if(rdet) message("Building the following detectors ${DETLIST}") endif() -# include the nptool standard CMake preamble -include("ressources/CMake/NPTool_CMake_Preamble.cmake") - set(CMAKE_BINARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib ) set(CMAKE_INCLUDE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/include ) diff --git a/NPSimulation/CMakeLists.txt b/NPSimulation/CMakeLists.txt index e56244e53..1aed2d72c 100644 --- a/NPSimulation/CMakeLists.txt +++ b/NPSimulation/CMakeLists.txt @@ -1,6 +1,10 @@ cmake_minimum_required (VERSION 2.8) include(CheckCXXCompilerFlag) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) + + project (NPSimulation) set (NPSIM_VERSION_MAJOR 2) set (NPSIM_VERSION_MINOR 0) diff --git a/Projects/BeLise/CMakeLists.txt b/Projects/BeLise/CMakeLists.txt index 6806d778c..22c74affd 100644 --- a/Projects/BeLise/CMakeLists.txt +++ b/Projects/BeLise/CMakeLists.txt @@ -1,2 +1,5 @@ cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/Projects/ComptonTelescope/CMakeLists.txt b/Projects/ComptonTelescope/CMakeLists.txt index 6806d778c..22c74affd 100644 --- a/Projects/ComptonTelescope/CMakeLists.txt +++ b/Projects/ComptonTelescope/CMakeLists.txt @@ -1,2 +1,5 @@ cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/Projects/Helios/CMakeLists.txt b/Projects/Helios/CMakeLists.txt index 6806d778c..22c74affd 100644 --- a/Projects/Helios/CMakeLists.txt +++ b/Projects/Helios/CMakeLists.txt @@ -1,2 +1,5 @@ cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/Projects/Lassa/CMakeLists.txt b/Projects/Lassa/CMakeLists.txt index 6806d778c..22c74affd 100644 --- a/Projects/Lassa/CMakeLists.txt +++ b/Projects/Lassa/CMakeLists.txt @@ -1,2 +1,5 @@ cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/Projects/MUGAST/CMakeLists.txt b/Projects/MUGAST/CMakeLists.txt index 6806d778c..22c74affd 100644 --- a/Projects/MUGAST/CMakeLists.txt +++ b/Projects/MUGAST/CMakeLists.txt @@ -1,2 +1,5 @@ cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/Projects/Nana/CMakeLists.txt b/Projects/Nana/CMakeLists.txt index 6806d778c..22c74affd 100644 --- a/Projects/Nana/CMakeLists.txt +++ b/Projects/Nana/CMakeLists.txt @@ -1,2 +1,5 @@ cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/Projects/S1554/CMakeLists.txt b/Projects/S1554/CMakeLists.txt index 6806d778c..22c74affd 100644 --- a/Projects/S1554/CMakeLists.txt +++ b/Projects/S1554/CMakeLists.txt @@ -1,2 +1,5 @@ cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/Projects/SPcoincW1/CMakeLists.txt b/Projects/SPcoincW1/CMakeLists.txt index 6806d778c..22c74affd 100644 --- a/Projects/SPcoincW1/CMakeLists.txt +++ b/Projects/SPcoincW1/CMakeLists.txt @@ -1,2 +1,5 @@ cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/Projects/Sharc/CMakeLists.txt b/Projects/Sharc/CMakeLists.txt index 6806d778c..22c74affd 100644 --- a/Projects/Sharc/CMakeLists.txt +++ b/Projects/Sharc/CMakeLists.txt @@ -1,2 +1,5 @@ cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/Projects/SharcEfficiency/CMakeLists.txt b/Projects/SharcEfficiency/CMakeLists.txt index 6806d778c..22c74affd 100644 --- a/Projects/SharcEfficiency/CMakeLists.txt +++ b/Projects/SharcEfficiency/CMakeLists.txt @@ -1,2 +1,5 @@ cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/Projects/T40/CMakeLists.txt b/Projects/T40/CMakeLists.txt index 6806d778c..22c74affd 100644 --- a/Projects/T40/CMakeLists.txt +++ b/Projects/T40/CMakeLists.txt @@ -1,2 +1,5 @@ cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/Projects/TRex_Miniball/CMakeLists.txt b/Projects/TRex_Miniball/CMakeLists.txt index 6806d778c..22c74affd 100644 --- a/Projects/TRex_Miniball/CMakeLists.txt +++ b/Projects/TRex_Miniball/CMakeLists.txt @@ -1,2 +1,5 @@ cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/Projects/e644pd/CMakeLists.txt b/Projects/e644pd/CMakeLists.txt index 6806d778c..22c74affd 100644 --- a/Projects/e644pd/CMakeLists.txt +++ b/Projects/e644pd/CMakeLists.txt @@ -1,2 +1,5 @@ cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file include("../../NPLib/ressources/CMake/NPAnalysis.cmake") diff --git a/Projects/new/CMakeLists.txt b/Projects/new/CMakeLists.txt index 6806d778c..22c74affd 100644 --- a/Projects/new/CMakeLists.txt +++ b/Projects/new/CMakeLists.txt @@ -1,2 +1,5 @@ cmake_minimum_required (VERSION 2.8) +# Setting the policy to match Cmake version +cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) +# include the default NPAnalysis cmake file include("../../NPLib/ressources/CMake/NPAnalysis.cmake") -- GitLab