diff --git a/Build/AtlasLCG/LCGConfig-version.cmake b/Build/AtlasLCG/LCGConfig-version.cmake index 80e6e5efddd2b2f1c2a5d18d71a2840721649c5d..5d589607d0eb3f4564812f88a21c88a5c0554fd4 100644 --- a/Build/AtlasLCG/LCGConfig-version.cmake +++ b/Build/AtlasLCG/LCGConfig-version.cmake @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: LCGConfig-version.cmake 752088 2016-06-03 11:34:42Z krasznaa $ +# $Id: LCGConfig-version.cmake 772148 2016-09-07 15:04:09Z krasznaa $ # # This file is used to figure out whether the LCG version that the user # requested can be delivered or not. @@ -35,6 +35,13 @@ if( PACKAGE_FIND_VERSION EQUAL 0 ) set( PACKAGE_VERSION_NUMBER 0 ) set( PACKAGE_VERSION_COMPATIBLE TRUE ) set( PACKAGE_VERSION_EXACT FALSE ) +elseif( NOT PACKAGE_FIND_VERSION ) + # If no version was requested: + message( STATUS "No LCG version requested. Not setting up release." ) + set( PACKAGE_VERSION 0 ) + set( PACKAGE_VERSION_NUMBER 0 ) + set( PACKAGE_VERSION_COMPATIBLE TRUE ) + set( PACKAGE_VERSION_EXACT FALSE ) # If a directory with the requested version string exists, then we're # done already. elseif( EXISTS @@ -43,13 +50,6 @@ elseif( EXISTS set( PACKAGE_VERSION_NUMBER ${PACKAGE_FIND_VERSION} ) set( PACKAGE_VERSION_COMPATIBLE TRUE ) set( PACKAGE_VERSION_EXACT TRUE ) -elseif( NOT PACKAGE_FIND_VERSION ) - # If no version was requested: - message( STATUS "No LCG version requested. Not setting up release." ) - set( PACKAGE_VERSION 0 ) - set( PACKAGE_VERSION_NUMBER 0 ) - set( PACKAGE_VERSION_COMPATIBLE TRUE ) - set( PACKAGE_VERSION_EXACT FALSE ) else() # If it doesn't exist, then pick up the latest release, and check if it's # newer than the one requested. diff --git a/Build/AtlasLCG/modules/FindBoost.cmake b/Build/AtlasLCG/modules/FindBoost.cmake index d1626d9c9c7324b2034366d9beb6edfa5c573cba..03f5a7c17abfefdf3a546b3de413b3d290a52e2a 100644 --- a/Build/AtlasLCG/modules/FindBoost.cmake +++ b/Build/AtlasLCG/modules/FindBoost.cmake @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: FindBoost.cmake 763307 2016-07-20 16:15:56Z alibrari $ +# $Id: FindBoost.cmake 772148 2016-09-07 15:04:09Z krasznaa $ # # This file is here to intercept find_package(Boost) calls, and # massage the paths produced by the system module, to make them relocatable. @@ -17,10 +17,12 @@ endif() # Make sure that Boost is not searched for using CMAKE_PREFIX_PATH, looking # for BoostConfig.cmake. As that would take precedence over the setting made # using BOOST_ROOT. -set( Boost_NO_BOOST_CMAKE TRUE ) -set( Boost_NO_SYSTEM_PATHS TRUE ) -set( CMAKE_SYSTEM_IGNORE_PATH /usr/include /usr/bin /usr/lib /usr/lib32 - /usr/lib64 /lib /lib32 /lib64 ) +if( BOOST_ROOT ) + set( Boost_NO_BOOST_CMAKE TRUE ) + set( Boost_NO_SYSTEM_PATHS TRUE ) + set( CMAKE_SYSTEM_IGNORE_PATH /usr/include /usr/bin /usr/lib /usr/lib32 + /usr/lib64 /lib /lib32 /lib64 ) +endif() # Temporarily clean out CMAKE_MODULE_PATH, so that we could pick up # FindBoost.cmake from CMake: diff --git a/Build/AtlasLCG/modules/FindCoin3D.cmake b/Build/AtlasLCG/modules/FindCoin3D.cmake index aab1484239913a9b99c0892fc09e1740a57e9b22..546e04bc6fa7f286cc1f88001572809af1620972 100644 --- a/Build/AtlasLCG/modules/FindCoin3D.cmake +++ b/Build/AtlasLCG/modules/FindCoin3D.cmake @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: FindCoin3D.cmake 724137 2016-02-16 09:01:57Z krasznaa $ +# $Id: FindCoin3D.cmake 772148 2016-09-07 15:04:09Z krasznaa $ # # This file is here to intercept find_package(Coin3D) calls, and # massage the paths produced by the system module, to make them relocatable. @@ -20,8 +20,10 @@ set( _modulePathBackup ${CMAKE_MODULE_PATH} ) set( CMAKE_MODULE_PATH ) # Make the code ignore the system path(s): -set( CMAKE_SYSTEM_IGNORE_PATH /usr/include /usr/bin /usr/lib /usr/lib32 - /usr/lib64 ) +if( COIN3D_ROOT ) + set( CMAKE_SYSTEM_IGNORE_PATH /usr/include /usr/bin /usr/lib /usr/lib32 + /usr/lib64 ) +endif() # Call CMake's own FindCoin3D.cmake. Note that the arguments created # for this script by CMake pass through to the official script. So we don't diff --git a/Build/AtlasLCG/modules/FindDavix.cmake b/Build/AtlasLCG/modules/FindDavix.cmake index 6cc578ac3a61e161190f4576b135340187395333..a75c5ad077187e09ee3843a3076c1bae370da934 100644 --- a/Build/AtlasLCG/modules/FindDavix.cmake +++ b/Build/AtlasLCG/modules/FindDavix.cmake @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: FindDavix.cmake 724137 2016-02-16 09:01:57Z krasznaa $ +# $Id: FindDavix.cmake 780184 2016-10-25 08:19:02Z elmsheus $ # # Defines: # - DAVIX_FOUND @@ -18,16 +18,16 @@ include( LCGFunctions ) # Declare the external module: lcg_external_module( NAME Davix - INCLUDE_SUFFIXES include INCLUDE_NAMES davix/davix.hpp - LIBRARY_SUFFIXES lib lib64 - DEFAULT_COMPONENTS davix ) + INCLUDE_SUFFIXES include/davix INCLUDE_NAMES davix.hpp + LIBRARY_SUFFIXES lib64 + COMPULSORY_COMPONENTS davix ) # Handle the standard find_package arguments: include( FindPackageHandleStandardArgs ) find_package_handle_standard_args( Davix DEFAULT_MSG DAVIX_INCLUDE_DIR DAVIX_LIBRARIES ) mark_as_advanced( DAVIX_FOUND DAVIX_INCLUDE_DIR DAVIX_INCLUDE_DIRS - DAVIX_LIBRARY_DIRS ) + DAVIX_LIBRARIES DAVIX_LIBRARY_DIRS ) # Set up the RPM dependency: lcg_need_rpm( Davix ) diff --git a/Build/AtlasLCG/modules/FindDoxygen.cmake b/Build/AtlasLCG/modules/FindDoxygen.cmake index f1b1d40570712266a8fa9ab2cf204191e4379d67..b906c8eb760874338140f3c907a14227cb62785b 100644 --- a/Build/AtlasLCG/modules/FindDoxygen.cmake +++ b/Build/AtlasLCG/modules/FindDoxygen.cmake @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: FindDoxygen.cmake 751138 2016-05-31 13:50:48Z krasznaa $ +# $Id: FindDoxygen.cmake 772148 2016-09-07 15:04:09Z krasznaa $ # # This file is here to intercept find_package(Doxygen) calls, and extend the # environment setup file of the project with the correct Doxygen paths. @@ -15,8 +15,10 @@ set( _modulePathBackup ${CMAKE_MODULE_PATH} ) set( CMAKE_MODULE_PATH ) # Make the code ignore the system path(s): -set( CMAKE_SYSTEM_IGNORE_PATH /usr/include /usr/bin /usr/lib /usr/lib32 - /usr/lib64 ) +if( DOXYGEN_ROOT ) + set( CMAKE_SYSTEM_IGNORE_PATH /usr/include /usr/bin /usr/lib /usr/lib32 + /usr/lib64 ) +endif() # Call CMake's own FindDoxygen.cmake. Note that the arguments created for this # script by CMake pass through to the official script. So we don't need to diff --git a/Build/AtlasLCG/modules/FindEXPAT.cmake b/Build/AtlasLCG/modules/FindEXPAT.cmake index 660e6afcc5a2269b29e2913ad0813c47ebf4ac3f..f9dc77f325c5c9227842eef6bbfd304f0450d22c 100644 --- a/Build/AtlasLCG/modules/FindEXPAT.cmake +++ b/Build/AtlasLCG/modules/FindEXPAT.cmake @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: FindEXPAT.cmake 719980 2016-01-27 08:38:07Z krasznaa $ +# $Id: FindEXPAT.cmake 772148 2016-09-07 15:04:09Z krasznaa $ # # File intercepting find_package(EXPAT) calls, and making the created # paths relocatable. @@ -15,8 +15,10 @@ set( _modulePathBackup ${CMAKE_MODULE_PATH} ) set( CMAKE_MODULE_PATH ) # Make the code ignore the system path(s): -set( CMAKE_SYSTEM_IGNORE_PATH /usr/include /usr/bin /usr/lib /usr/lib32 - /usr/lib64 ) +if( EXPAT_ROOT ) + set( CMAKE_SYSTEM_IGNORE_PATH /usr/include /usr/bin /usr/lib /usr/lib32 + /usr/lib64 ) +endif() # Call CMake's own FindEXPAT.cmake. Note that the arguments created # for this script by CMake pass through to the official script. So we don't diff --git a/Build/AtlasLCG/modules/FindGSL.cmake b/Build/AtlasLCG/modules/FindGSL.cmake index f87209f476beb4963f028c9b9485d88eeb2f0370..6384af79c3358367d85ed4abc5088324b10fb5be 100644 --- a/Build/AtlasLCG/modules/FindGSL.cmake +++ b/Build/AtlasLCG/modules/FindGSL.cmake @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: FindGSL.cmake 724137 2016-02-16 09:01:57Z krasznaa $ +# $Id: FindGSL.cmake 772148 2016-09-07 15:04:09Z krasznaa $ # # This file is here to intercept find_package(GSL) calls, and massage # the paths produced by the system module, to make them relocatable. @@ -10,8 +10,10 @@ include( LCGFunctions ) # Ignore the system paths: -set( CMAKE_SYSTEM_IGNORE_PATH /usr/include /usr/bin /usr/lib /usr/lib32 - /usr/lib64 ) +if( GSL_ROOT ) + set( CMAKE_SYSTEM_IGNORE_PATH /usr/include /usr/bin /usr/lib /usr/lib32 + /usr/lib64 ) +endif() # Temporarily clean out CMAKE_MODULE_PATH, so that we could pick up # FindGSL.cmake from CMake: diff --git a/Build/AtlasLCG/modules/FindPythonInterp.cmake b/Build/AtlasLCG/modules/FindPythonInterp.cmake index d58bcbfe10b1338fd6ceaa898ab8ced2c5bf8ee1..551f5e47ca207d82b646db04adb971163def1cea 100644 --- a/Build/AtlasLCG/modules/FindPythonInterp.cmake +++ b/Build/AtlasLCG/modules/FindPythonInterp.cmake @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: FindPythonInterp.cmake 752031 2016-06-03 09:12:47Z krasznaa $ +# $Id: FindPythonInterp.cmake 782719 2016-11-07 12:30:42Z limosani $ # # This file is here to intercept find_package(PythonInterp) calls, and extend # the environment setup file of the project with the correct Python paths. @@ -34,7 +34,14 @@ set( CMAKE_SYSTEM_IGNORE_PATH ) # Set some extra variable(s), to make the environment configuration easier: if( PYTHON_EXECUTABLE ) get_filename_component( PythonInterp_BINARY_PATH ${PYTHON_EXECUTABLE} PATH ) + get_filename_component( PYTHONHOME ${PythonInterp_BINARY_PATH} PATH ) + set ( PythonInterp_ENVIRONMENT + SET PYTHONHOME ${PYTHONHOME} ) endif() + # Set up the RPM dependency: lcg_need_rpm( Python FOUND_NAME PYTHONINTERP VERSION_NAME PYTHON ) + + + diff --git a/Build/AtlasLCG/modules/FindPythonLibs.cmake b/Build/AtlasLCG/modules/FindPythonLibs.cmake index 93dc624d418a909030d9fdf25077467a4a3b1140..75c1ebf207ee86ca680f8ffff1722887e7e6d02f 100644 --- a/Build/AtlasLCG/modules/FindPythonLibs.cmake +++ b/Build/AtlasLCG/modules/FindPythonLibs.cmake @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: FindPythonLibs.cmake 752031 2016-06-03 09:12:47Z krasznaa $ +# $Id: FindPythonLibs.cmake 782719 2016-11-07 12:30:42Z limosani $ # # This file is here to intercept find_package(PythonLibs) calls, and # massage the paths produced by the system module, to make them relocatable. @@ -70,7 +70,11 @@ if( PYTHONLIBS_FOUND AND NOT GAUDI_ATLAS ) # lcg_generate_env function later on: set( PYTHONLIBS_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS} ) + get_filename_component( PYTHONHOME ${PYTHONLIBS_LIBRARY_DIRS} PATH ) + set( PythonLibs_ENVIRONMENT + SET PYTHONHOME ${PYTHONHOME} ) endif() + # Set up the RPM dependency: lcg_need_rpm( Python FOUND_NAME PYTHONLIBS VERSION_NAME PYTHON ) diff --git a/Build/AtlasLCG/modules/FindQt4.cmake b/Build/AtlasLCG/modules/FindQt4.cmake index 94f2728ed9ea11ba77463561cafb79db38b75b83..72a57af563bad4184940159fd148a419bff2470c 100644 --- a/Build/AtlasLCG/modules/FindQt4.cmake +++ b/Build/AtlasLCG/modules/FindQt4.cmake @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: FindQt4.cmake 728694 2016-03-09 15:42:56Z krasznaa $ +# $Id: FindQt4.cmake 772148 2016-09-07 15:04:09Z krasznaa $ # # This file is here to intercept find_package(Qt4) calls, and # massage the paths produced by the system module, to make them relocatable. @@ -15,8 +15,10 @@ set( _modulePathBackup ${CMAKE_MODULE_PATH} ) set( CMAKE_MODULE_PATH ) # Make the code ignore the system path(s): -set( CMAKE_SYSTEM_IGNORE_PATH /usr/include /usr/bin /usr/lib /usr/lib32 - /usr/lib64 ) +if( QT4_ROOT ) + set( CMAKE_SYSTEM_IGNORE_PATH /usr/include /usr/bin /usr/lib /usr/lib32 + /usr/lib64 ) +endif() # Call CMake's own FindQt4.cmake. Note that the arguments created # for this script by CMake pass through to the official script. So we don't diff --git a/Build/AtlasLCG/modules/FindQt5.cmake b/Build/AtlasLCG/modules/FindQt5.cmake index a1b60474166c9cae818e76476af3f31953439b09..8f3296bfc514cd6935eeb5c41a2ce1c117cc6062 100644 --- a/Build/AtlasLCG/modules/FindQt5.cmake +++ b/Build/AtlasLCG/modules/FindQt5.cmake @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: FindQt5.cmake 762134 2016-07-15 10:00:34Z krasznaa $ +# $Id: FindQt5.cmake 772148 2016-09-07 15:04:09Z krasznaa $ # # This file is here to intercept find_package(Qt5) calls, and # massage the paths produced by the system module, to make them relocatable. @@ -20,8 +20,10 @@ set( _modulePathBackup ${CMAKE_MODULE_PATH} ) set( CMAKE_MODULE_PATH ) # Make the code ignore the system path(s): -set( CMAKE_SYSTEM_IGNORE_PATH /usr/include /usr/bin /usr/lib /usr/lib32 - /usr/lib64 ) +if( QT5_ROOT ) + set( CMAKE_SYSTEM_IGNORE_PATH /usr/include /usr/bin /usr/lib /usr/lib32 + /usr/lib64 ) +endif() # Let Qt's own CMake code be found: find_package( Qt5 ) diff --git a/Build/AtlasLCG/modules/FindROOT.cmake b/Build/AtlasLCG/modules/FindROOT.cmake index c017b8b88850f52ba728c693faab6031be7cb1d8..be8c4ef54b05e276971c444c1b088b801b3098e8 100644 --- a/Build/AtlasLCG/modules/FindROOT.cmake +++ b/Build/AtlasLCG/modules/FindROOT.cmake @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: FindROOT.cmake 744728 2016-05-04 07:37:43Z krasznaa $ +# $Id: FindROOT.cmake 775392 2016-09-27 14:46:32Z krasznaa $ # # Find the ROOT libraries, headers and tools. # Sets: @@ -62,8 +62,11 @@ find_path( ROOT_PYTHON_PATH ROOT.py # Handle the standard find_package arguments: include( FindPackageHandleStandardArgs ) -find_package_handle_standard_args( ROOT DEFAULT_MSG ROOT_INCLUDE_DIR - ROOT_VERSION_STRING ROOT_LIBRARIES ROOT_BINARY_PATH ROOT_PYTHON_PATH ) +find_package_handle_standard_args( ROOT + FOUND_VAR ROOT_FOUND + REQUIRED_VARS ROOT_INCLUDE_DIR ROOT_LIBRARIES ROOT_BINARY_PATH + ROOT_PYTHON_PATH + VERSION_VAR ROOT_VERSION_STRING ) mark_as_advanced( ROOT_FOUND ROOT_INCLUDE_DIR ROOT_INCLUDE_DIRS ROOT_LIBRARIES ROOT_LIBRARY_DIRS ROOT_BINARY_PATH ROOT_PYTHON_PATH ) diff --git a/Build/AtlasLCG/modules/FindUUID.cmake b/Build/AtlasLCG/modules/FindUUID.cmake index a3484b1cc0ceee0f1b6eeda88581163813dabbbe..8ed17685f0b9fe01c6f43515a005482b4a980d81 100644 --- a/Build/AtlasLCG/modules/FindUUID.cmake +++ b/Build/AtlasLCG/modules/FindUUID.cmake @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: FindUUID.cmake 718732 2016-01-20 12:30:12Z krasznaa $ +# $Id: FindUUID.cmake 772148 2016-09-07 15:04:09Z krasznaa $ # # - Locate UUID library # Defines: @@ -25,12 +25,23 @@ lcg_external_module( NAME UUID LIBRARY_SUFFIXES lib COMPULSORY_COMPONENTS uuid ) +# On MacOS X the uuid functions are in libSystem.dylib. So no extra library +# needs to be linked against. +if( APPLE ) + set( uuid_extra_dep ) +else() + set( uuid_extra_dep UUID_LIBRARIES ) +endif() + # Handle the standard find_package arguments: include( FindPackageHandleStandardArgs ) find_package_handle_standard_args( UUID DEFAULT_MSG UUID_INCLUDE_DIR - UUID_LIBRARIES ) + ${uuid_extra_dep} ) mark_as_advanced( UUID_FOUND UUID_INCLUDE_DIR UUID_INCLUDE_DIRS - UUID_LIBRARIES UUID_LIBRARY_DIRS ) + UUID_LIBRARIES UUID_LIBRARY_DIRS ) # For SLC6 this is picked up from the system. But for CC7, it will come from # LCG. So eventually an RPM dependency will have to be added in a smart way... + +# Clean up: +unset( uuid_extra_dep ) diff --git a/Build/AtlasLCG/modules/LCGFunctions.cmake b/Build/AtlasLCG/modules/LCGFunctions.cmake index 0f2a7a5dab06595a4ac57bc965da78e2eda02825..543e48ed09cca6a921f221fa8d0e1b2ee9dc4c16 100644 --- a/Build/AtlasLCG/modules/LCGFunctions.cmake +++ b/Build/AtlasLCG/modules/LCGFunctions.cmake @@ -1,6 +1,6 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: LCGFunctions.cmake 734807 2016-04-08 10:32:33Z krasznaa $ +# $Id: LCGFunctions.cmake 772148 2016-09-07 15:04:09Z krasznaa $ # # Some helper functions, used by the Find<Bla>.cmake modules of the package. # @@ -181,6 +181,12 @@ function( lcg_need_rpm name ) # Add the optional argument(s): cmake_parse_arguments( ARG "" "FOUND_NAME;VERSION_NAME" "" ${ARGN} ) + # In case no actual LCG release is set up, don't set up any LCG RPM + # dependencies either: + if( LCG_VERSION EQUAL 0 ) + return() + endif() + # Create the "found name" of the package: if( ARG_FOUND_NAME ) set( nameFound ${ARG_FOUND_NAME} )