Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cmavungu/atlasexternals
  • fwinkl/atlasexternals2
  • ndiederi/atlasexternals
  • dguest/atlasexternals
  • yharris/atlasexternals
  • zhangbo/atlasexternals
  • cgutscho/atlasexternals
  • bstanisl/atlasexternals
  • juesseiv/atlasexternals-celeritas
  • mavogel/atlasexternals
  • whopkins/atlasexternals
  • feickert/atlasexternals
  • cvarni/atlasexternals
  • asopio/atlasexternals
  • qidong/atlasexternals
  • dbaronmo/atlasexternals
  • zhangzi/atlasexternals
  • xju/atlasexternals
  • rhauser/atlasexternals
  • qberthet/atlasexternals
  • voigt/atlasexternals
  • muschmid/atlasexternals
  • ponyisi/atlasexternals
  • lgagnon/atlasexternals
  • toyamaza/atlasexternals
  • wmccorma/atlasexternals
  • tadej/atlasexternals
  • will/atlasexternals
  • dcasperfaser/atlasexternals
  • faser/offline/atlasexternals
  • corentin/atlasexternals
  • sjiggins/atlasexternals
  • bschlag/atlasexternals
  • ywng/atlasexternals
  • averbyts/atlasexternals
  • mbandier/atlasexternals
  • ekourlit/atlasexternals
  • dbakshig/atlasexternals
  • aundrus/atlasexternals
  • simmons/atlasexternals
  • mleblanc/atlasexternals
  • amete/atlasexternals
  • asonay/atlasexternals
  • ekasimi/atlasexternals
  • chays/atlasexternals
  • mmuskinj/atlasexternals
  • kzoch/atlasexternals
  • ychiu/atlasexternals
  • pagessin/atlasexternals
  • japost/atlasexternals
  • fsiegert/atlasexternals
  • evc/atlasexternals
  • tamartin/atlasexternals
  • ivivarel/atlasexternals
  • mvanadia/atlasexternals
  • jferrand/atlasexternals
  • bmorgan/atlasexternals
  • muzaffar/atlasexternals
  • pberta/atlasexternals
  • mnowak/atlasexternals
  • jcatmore/atlasexternals
  • elmsheus/atlasexternals
  • fwinkl/atlasexternals
  • akraszna/atlasexternals
  • jchapman/atlasexternals
  • atlas/atlasexternals
66 results
Show changes
Commits on Source (205)
Showing
with 203 additions and 96 deletions
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
#
# This file is used to make it possible to pull in the code of this package into
# a top level CMake file using:
......@@ -51,6 +51,13 @@ if( CTEST_USE_LAUNCHERS )
"AtlasCMake: Package build succeeded" )
endif()
# Set ATLAS specific policies to work around temporary problems:
cmake_policy(SET CMP0058 OLD) # suppress warning about .stamp.txt files with ninja (ATLINFR-2651)
if( ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0" )
cmake_policy(SET CMP0074 OLD) # suppress warning about _ROOT variables (ATLINFR-2651)
endif()
# Include the AtlasFunctions file:
include( AtlasFunctions )
......
......@@ -68,7 +68,7 @@ if( CMAKE_COMPILER_IS_GNUCXX )
set( ATLAS_CXX_FLAGS_RELWITHDEBINFO "-DNDEBUG -O2 -g"
CACHE STRING "Default optimisation settings for RelWithDebInfo mode" )
set( ATLAS_CXX_FLAGS_DEBUG "-g"
CACHE STRING "Default optimisation settings for Release mode" )
CACHE STRING "Default optimisation settings for Debug mode" )
else()
......@@ -78,7 +78,7 @@ else()
set( ATLAS_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}"
CACHE STRING "Default optimisation settings for RelWithDebInfo mode" )
set( ATLAS_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}"
CACHE STRING "Default optimisation settings for Release mode" )
CACHE STRING "Default optimisation settings for Debug mode" )
endif()
......
......@@ -13,6 +13,9 @@
# and even this should only be included if absolutely necessary.
#
# Minimum CMake version required:
cmake_minimum_required( VERSION 3.6 )
# Include the required module(s):
include( CMakeParseArguments )
include( ExternalProject )
......@@ -171,12 +174,15 @@ function( atlas_project name version )
"No explicit build type requested, using \"Default\" build" )
endif()
# Construct a platform name:
# Construct a platform name. In a slightly more complicated way than in the
# past. Allowing the users to override the name selected automatically, using
# the ATLAS_FORCE_PLATFORM cache variable.
atlas_platform_id( _platform )
set( ATLAS_PLATFORM ${_platform} CACHE STRING
"Build platform of the project" FORCE )
set( BUILDNAME ${_platform} CACHE STRING
set( ATLAS_FORCE_PLATFORM ${_platform} CACHE STRING
"Build platform of the project" )
set( BUILDNAME ${ATLAS_FORCE_PLATFORM} CACHE STRING
"Build platform for CDash" FORCE )
set( ATLAS_PLATFORM ${ATLAS_FORCE_PLATFORM} )
message( STATUS "Using platform name: ${ATLAS_PLATFORM}" )
# Set a default installation path. One that RPM making works with:
......@@ -284,6 +290,7 @@ function( atlas_project name version )
DESTINATION ${CMAKE_INSTALL_CMAKEDIR}/modules
USE_SOURCE_PERMISSIONS
PATTERN ".svn" EXCLUDE
PATTERN ".git" EXCLUDE
PATTERN "*~" EXCLUDE )
mark_as_advanced( _thisFile )
unset( _thisFile )
......@@ -370,8 +377,7 @@ function( atlas_project name version )
# Reset the platform name, as the base projects may use a different one than
# the one used for this project.
set( ATLAS_PLATFORM ${_platform} )
set( BUILDNAME ${_platform} )
set( ATLAS_PLATFORM ${ATLAS_FORCE_PLATFORM} )
# Set the ATLAS_BASE_PROJECTS variable in the parent scope. To be able to
# use it in the CPack configuration:
......@@ -387,6 +393,7 @@ function( atlas_project name version )
set( ATLAS_PACKAGE_PRINTOUT_INTERVAL ${_interval}
CACHE STRING "Package counter printout interval" )
string( TIMESTAMP _timeStart "%s" )
# Include the packages:
set( _counter 0 )
set( _selectedPackages 0 )
......@@ -415,11 +422,17 @@ function( atlas_project name version )
list( APPEND _selectedPackageDirs ${_pkgDir} )
unset( _binDir )
endforeach()
string( TIMESTAMP _timeStop "%s" )
math( EXPR _timeSeconds "${_timeStop}-${_timeStart}" )
message( STATUS "Number of packages configured: ${_selectedPackages}" )
message( STATUS "Time for package configuration: ${_timeSeconds} seconds" )
unset( _counter )
unset( _doNotPrint )
unset( _isSelected )
unset( _selectedPackages )
unset( _timeStart )
unset( _timeStop )
unset( _timeSeconds )
# Check whether all rules from a possible package filter file were used:
atlas_print_unused_package_selection_rules()
......@@ -465,9 +478,8 @@ function( atlas_project name version )
# Reset the platform name, as the base projects may use a different one than
# the one used for this project.
set( ATLAS_PLATFORM ${_platform} )
set( ATLAS_PLATFORM ${_platform} PARENT_SCOPE )
set( BUILDNAME ${_platform} )
set( ATLAS_PLATFORM ${ATLAS_FORCE_PLATFORM} )
set( ATLAS_PLATFORM ${ATLAS_FORCE_PLATFORM} PARENT_SCOPE )
# Start constructing the files for the sub-project setup:
get_property( _compiledPackages GLOBAL PROPERTY
......@@ -585,7 +597,6 @@ function( atlas_project name version )
unset( _version )
unset( _packagesFileName )
unset( _packageDirs )
unset( _selectedPackageDirs )
# Generate a compilers.txt file that list the types and versions of the
# compilers that were used to build this project.
......@@ -705,6 +716,40 @@ function( atlas_project name version )
unset( _packages_found )
unset( ENVFILE_GEN )
# Set up Doxygen.
set( ATLAS_DOXYFILE_INPUT "${CMAKE_SOURCE_DIR}/Doxyfile.in"
CACHE FILEPATH "Path to the Doxyfile that needs to be configured" )
find_package( Doxygen QUIET )
if( EXISTS "${ATLAS_DOXYFILE_INPUT}" AND DOXYGEN_FOUND )
# Tell the user what's happening.
message( STATUS "Setting up the 'doc' target using Doxygen" )
# Collect the paths of all selected packages.
set( SELECTED_PACKAGES )
foreach( _pkgDir ${_selectedPackageDirs} )
file( RELATIVE_PATH _srcDir "${CMAKE_BINARY_DIR}"
"${CMAKE_SOURCE_DIR}/${_pkgDir}" )
set( SELECTED_PACKAGES "${SELECTED_PACKAGES} ${_srcDir}" )
endforeach()
# Specialise the project-specific Doxyfile.
set( _doxyfile "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Doxyfile" )
configure_file( "${ATLAS_DOXYFILE_INPUT}" "${_doxyfile}" @ONLY )
# Set up the custom command for calling Doxygen.
add_custom_target( doc
${DOXYGEN_EXECUTABLE} "${_doxyfile}"
COMMENT "Generating Doxygen documentation"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" )
# Clean up.
unset( SELECTED_PACKAGES )
unset( _doxyfile )
endif()
# Clean up.
unset( _selectedPackageDirs )
# Add the CTest customisation file to the build tree:
find_file( _ctestCustom CTestCustom.cmake.in
PATH_SUFFIXES skeletons PATHS ${CMAKE_MODULE_PATH} )
......@@ -988,7 +1033,9 @@ macro( atlas_subdir name )
install( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION ${CMAKE_INSTALL_SRCDIR}/${pkgDir}
USE_SOURCE_PERMISSIONS
PATTERN ".svn" EXCLUDE )
PATTERN ".svn" EXCLUDE
PATTERN ".git" EXCLUDE
PATTERN "*~" EXCLUDE )
endif()
......
......@@ -268,6 +268,9 @@ function( atlas_install_python_modules )
# Get the package/subdirectory name:
atlas_get_package_name( pkgName )
# Get the package's directory:
atlas_get_package_dir( pkgDir )
# As a first thing, let's get a list of the files/directories specified:
file( GLOB _files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${ARGN} )
......@@ -275,6 +278,8 @@ function( atlas_install_python_modules )
set( _tgtName ${pkgName}PythonBytecodeInstall )
_atlas_create_install_target( ${_tgtName} )
add_dependencies( Package_${pkgName} ${_tgtName} )
set_property( TARGET ${_tgtName} PROPERTY LABELS ${pkgName} )
set_property( TARGET ${_tgtName} PROPERTY FOLDER ${pkgDir}/Internals )
# Now loop over all file names:
foreach( _file ${_files} )
......@@ -332,6 +337,7 @@ function( atlas_install_python_modules )
add_custom_command( OUTPUT ${_bytecode}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_bytecodeDir}
COMMAND ${PYTHON_EXECUTABLE} ${_pycmdFile}
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${_pyFile}"
VERBATIM )
# Make our installation target call this custom command:
......@@ -392,6 +398,7 @@ function( atlas_install_python_modules )
COMMAND ${CMAKE_COMMAND} -E make_directory
${CMAKE_PYTHON_OUTPUT_DIRECTORY}/${pkgName}
COMMAND ${PYTHON_EXECUTABLE} ${_pycmdFile}
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${_file}"
VERBATIM )
# Make our installation target call this custom command:
......
......@@ -173,18 +173,18 @@ function( atlas_compiler_id compiler isValid )
# Translate the compiler ID:
set( _prefix )
if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" )
set( _prefix "gcc" )
elseif( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
elseif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
set( _prefix "clang" )
elseif( CMAKE_CXX_COMPILER_ID STREQUAL "Intel" )
elseif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" )
set( _prefix "icc" )
else()
set( ${compiler} "unknown" PARENT_SCOPE )
set( ${isValid} FALSE PARENT_SCOPE )
return()
endif()
# Translate the compiler version:
set( _version )
if( CMAKE_CXX_COMPILER_VERSION MATCHES "^([0-9]+).([0-9]+).*"
......@@ -208,6 +208,13 @@ endfunction( atlas_compiler_id )
#
function( atlas_os_id os isValid )
# Return cached result if possible:
if ( ATLAS_OS_ID )
set( ${os} ${ATLAS_OS_ID} PARENT_SCOPE )
set( ${isValid} TRUE PARENT_SCOPE )
return()
endif()
set( _name )
if( APPLE )
# Set a default version in case the following should not work:
......@@ -240,8 +247,14 @@ function( atlas_os_id os isValid )
set( _linuxShort "ubuntu" )
elseif( _linuxId MATCHES "CentOS" )
set( _linuxShort "centos" )
elseif( _linuxId MATCHES "RedHat" )
set( _linuxShort "rhel" )
elseif( _linuxId MATCHES "Debian" )
set( _linuxShort "debian" )
elseif( _linuxId MATCHES "SUSE" )
set( _linuxShort "suse" )
else()
message( WARNING "Linux flavour not recognised" )
message( WARNING "Linux flavour (${_linuxId}) not recognised" )
set( _linuxShort "linux" )
endif()
# Get the linux version number:
......@@ -250,15 +263,16 @@ function( atlas_os_id os isValid )
OUTPUT_VARIABLE _linuxVers )
# Try to parse it:
if( _linuxVers MATCHES "^Release:[^0-9]*([0-9]+)\\.([0-9]+).*" )
if( "${_linuxShort}" STREQUAL "ubuntu" )
# For Ubuntu include the minor version number as well:
if( ( "${_linuxShort}" STREQUAL "ubuntu" ) OR
( "${_linuxShort}" STREQUAL "suse" ) )
# For Ubuntu and SUSE include the minor version number as well:
set( _name "${_linuxShort}${CMAKE_MATCH_1}${CMAKE_MATCH_2}" )
else()
# For other Linux flavours use only the major version number:
set( _name "${_linuxShort}${CMAKE_MATCH_1}" )
endif()
elseif(_linuxVers MATCHES "^Release:[^0-9]*([0-9]+).*" )
set( _name "${_linuxShort}${CMAKE_MATCH_1}" )
set( _name "${_linuxShort}${CMAKE_MATCH_1}" )
else()
set( ${os} "unknown" PARENT_SCOPE )
set( ${isValid} FALSE PARENT_SCOPE )
......@@ -270,7 +284,8 @@ function( atlas_os_id os isValid )
return()
endif()
# Set the return values:
# Set and cache the return values:
set( ATLAS_OS_ID "${_name}" CACHE INTERNAL "Compact platform name" )
set( ${os} ${_name} PARENT_SCOPE )
set( ${isValid} TRUE PARENT_SCOPE )
......@@ -674,8 +689,8 @@ macro( atlas_cpack_setup )
# Select the generator(s):
if( APPLE )
set( CPACK_GENERATOR "TGZ" "PackageMaker" )
set( CPACK_SOURCE_GENERATOR "TBZ2" )
set( CPACK_GENERATOR "TGZ" )
set( CPACK_SOURCE_GENERATOR "TGZ" )
else()
set( CPACK_GENERATOR "RPM" )
set( CPACK_SOURCE_GENERATOR "RPM" )
......@@ -1199,6 +1214,7 @@ endfunction( atlas_print_unused_package_selection_rules )
function( atlas_generate_releasedata )
# Set variables necessary for the ReleaseData generation:
unset( ENV{TZ} ) # Work around CMake bug #18431
string( TIMESTAMP CMAKE_BUILD_DATE "%Y-%m-%dT%H%M" )
if( "$ENV{NIGHTLY_NAME}" STREQUAL "" )
# Find the helper script generating the nightly name:
......@@ -1241,6 +1257,11 @@ function( atlas_generate_releasedata )
"${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}" )
endif()
if( "$ENV{gcc_path}" STREQUAL "" )
set( ENV{gcc_path}
"${CMAKE_CXX_COMPILER}" )
endif()
# And now generate/install the ReleaseData file:
find_file( _releaseData ReleaseData.in
PATH_SUFFIXES skeletons PATHS ${CMAKE_MODULE_PATH} )
......
......@@ -103,8 +103,7 @@ function( _atlas_add_script_test testName )
# in a package that has a python/ directory.
set( _command "${_script}" )
else()
file( RELATIVE_PATH _command ${CMAKE_CURRENT_BINARY_DIR}/test-bin
${CMAKE_CURRENT_SOURCE_DIR}/${_script} )
set( _command "${CMAKE_CURRENT_SOURCE_DIR}/${_script}" )
endif()
while( _args )
list( GET _args 0 _arg )
......@@ -136,7 +135,8 @@ endfunction( _atlas_add_script_test )
# [PRE_EXEC_SCRIPT script]
# [POST_EXEC_SCRIPT script]
# [ENVIRONMENT env]
# [PROPERTIES <name> <value>...] )
# [PROPERTIES <name> <value>...]
# [NOEXEC] )
#
# Or like:
#
......@@ -161,10 +161,11 @@ function( atlas_add_test testName )
endif()
# Parse the options given to the function:
set( _booleanArgs NOEXEC )
set( _singleParamArgs SCRIPT EXTRA_PATTERNS ENVIRONMENT
PRE_EXEC_SCRIPT POST_EXEC_SCRIPT )
set( _multiParamArgs SOURCES PROPERTIES )
cmake_parse_arguments( ARG "" "${_singleParamArgs}"
cmake_parse_arguments( ARG "${_booleanArgs}" "${_singleParamArgs}"
"${_multiParamArgs}" ${ARGN} )
# A sanity check:
......@@ -201,6 +202,11 @@ function( atlas_add_test testName )
message( FATAL_ERROR "Internal logic error detected!" )
endif()
# If the test is only to be set up, but not to be executed, stop here:
if( ARG_NOEXEC )
return()
endif()
# Create the directory in which the unit tests will be executed from:
file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun )
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
#
# - Locate JavaSDK
# Defines:
#
# JAVASDK_FOUND
# JAVASDK_INCLUDE_DIR
# JAVASDK_INCLUDE_DIRS (not cached)
# JAVASDK_LIBRARIES
#
# Can be steered using JAVASDK_ROOT.
#
# Include the helper code:
include( AtlasInternals )
# Declare the module:
atlas_external_module( NAME JavaSDK
INCLUDE_SUFFIXES include INCLUDE_NAMES jni.h )
if( JAVASDK_INCLUDE_DIR )
list( APPEND JAVASDK_INCLUDE_DIRS ${JAVASDK_INCLUDE_DIR}/linux )
endif()
# Handle the standard find_package arguments:
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( JavaSDK DEFAULT_MSG JAVASDK_INCLUDE_DIR )
mark_as_advanced( JAVASDK_FOUND JAVASDK_INCLUDE_DIR JAVASDK_INCLUDE_DIRS )
......@@ -45,6 +45,8 @@ if( DQM-COMMON_FOUND )
${DQM-COMMON_ROOT}/installed/$ENV{CMTCONFIG}/bin
${DQM-COMMON_ROOT}/installed/share/bin )
endif()
set( DQM-COMMON_ENVIRONMENT
SET TDAQ_RELEASE_BASE $ENV{TDAQ_RELEASE_BASE} )
endif()
# Add the RPM dependencies:
......
......@@ -50,7 +50,8 @@ if( TDAQ-COMMON_FOUND )
${TDAQ-COMMON_ROOT}/installed/share/bin )
endif()
set( TDAQ-COMMON_ENVIRONMENT
SET TDAQ_PYTHON_HOME ${PYTHONHOME} )
SET TDAQ_PYTHON_HOME ${PYTHONHOME}
SET TDAQ_RELEASE_BASE $ENV{TDAQ_RELEASE_BASE} )
endif()
# Add the RPM dependencies:
......
......@@ -56,7 +56,8 @@ if( TDAQ_FOUND )
SET TDAQ_DB_PATH ${TDAQ_ROOT}/installed/share/data
APPEND TDAQ_DB_PATH ${TDAQ_ROOT}/installed/databases
APPEND TDAQ_DB_PATH ${TDAQ_ROOT}/databases
SET TDAQ_VERSION ${TDAQ_VERSION} )
SET TDAQ_VERSION ${TDAQ_VERSION}
SET TDAQ_RELEASE_BASE $ENV{TDAQ_RELEASE_BASE} )
endif()
# When using tdaq, some macro definitions are made in the tdaq headers,
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
#
# Defines:
#
# XML_FOUND
# XML_INCLUDE_DIR
# XML_LIBRARIES
#
# Find the package using CMake's built-in FindLibXml2.cmake module:
if( xml_FIND_QUIETLY )
find_package( LibXml2 QUIET )
else()
find_package( LibXml2 )
endif()
# Set the variables expected by the offline code:
if( LIBXML2_FOUND )
set( XML_FOUND TRUE )
set( XML_INCLUDE_DIR ${LIBXML2_INCLUDE_DIR} )
set( XML_INCLUDE_DIRS ${XML_INCLUDE_DIR} )
set( XML_LIBRARIES ${LIBXML2_LIBRARIES} )
set( XML_DEFINITIONS ${LIBXML2_DEFINITIONS} )
endif()
#!/usr/bin/env @BASH_EXECUTABLE@
#!@BASH_EXECUTABLE@
#
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
#
......
#!/usr/bin/env @BASH_EXECUTABLE@
#!@BASH_EXECUTABLE@
#
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
#
......
......@@ -5,3 +5,5 @@ project name:${CMAKE_PROJECT_NAME}
nightly release:$ENV{PROJECT_RELNAME_COPY}
date:${CMAKE_BUILD_DATE}
compiler:$ENV{gcc_version}
cxxpath:$ENV{gcc_path}
cmake:${CMAKE_VERSION}
......@@ -34,11 +34,11 @@ function( lcg_compiler_id compiler isValid )
# Translate the compiler ID:
set( _prefix )
if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" )
set( _prefix "gcc" )
elseif( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
elseif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
set( _prefix "clang" )
elseif( CMAKE_CXX_COMPILER_ID STREQUAL "Intel" )
elseif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" )
set( _prefix "icc" )
else()
set( ${compiler} "unknown" PARENT_SCOPE )
......@@ -69,6 +69,13 @@ endfunction( lcg_compiler_id )
#
function( lcg_os_id os isValid )
# Return cached result if possible:
if ( LCG_OS_ID )
set( ${os} ${LCG_OS_ID} PARENT_SCOPE )
set( ${isValid} TRUE PARENT_SCOPE )
return()
endif()
# Reset the result variable as a start:
set( _name )
......@@ -100,6 +107,12 @@ function( lcg_os_id os isValid )
set( _linuxShort "ubuntu" )
elseif( _lcgLinuxId MATCHES "CentOS" )
set( _linuxShort "centos" )
elseif( _lcgLinuxId MATCHES "RedHat" )
set( _linuxShort "rhel" )
elseif( _lcgLinuxId MATCHES "Debian" )
set( _linuxShort "debian" )
elseif( _lcgLinuxId MATCHES "SUSE" )
set( _linuxShort "suse" )
else()
message( WARNING "Linux flavour (${_lcgLinuxId}) not recognised" )
set( _linuxShort "linux" )
......@@ -110,15 +123,16 @@ function( lcg_os_id os isValid )
OUTPUT_VARIABLE _lcgLinuxVers )
# Try to parse it:
if( _lcgLinuxVers MATCHES "^Release:[^0-9]*([0-9]+)\\.([0-9]+).*" )
if( "${_linuxShort}" STREQUAL "ubuntu" )
# For Ubuntu include the minor version number as well:
if( ( "${_linuxShort}" STREQUAL "ubuntu" ) OR
( "${_linuxShort}" STREQUAL "suse" ) )
# For Ubuntu and SUSE include the minor version number as well:
set( _name "${_linuxShort}${CMAKE_MATCH_1}${CMAKE_MATCH_2}" )
else()
# For other Linux flavours use only the major version number:
set( _name "${_linuxShort}${CMAKE_MATCH_1}" )
endif()
elseif(_lcgLinuxVers MATCHES "^Release:[^0-9]*([0-9]+).*" )
set( _name "${_linuxShort}${CMAKE_MATCH_1}" )
set( _name "${_linuxShort}${CMAKE_MATCH_1}" )
else()
message( WARNING "Linux release (${_lcgLinuxVers}) not parseable" )
set( ${os} "unknown" PARENT_SCOPE )
......@@ -131,7 +145,8 @@ function( lcg_os_id os isValid )
return()
endif()
# Set the return values:
# Set and cache the return values:
set( LCG_OS_ID "${_name}" CACHE INTERNAL "Compact platform name" )
set( ${os} ${_name} PARENT_SCOPE )
set( ${isValid} TRUE PARENT_SCOPE )
......@@ -423,6 +438,8 @@ if( NOT LCG_VERSION EQUAL 0 )
set( _path "${_path}:${LIBXML2_ROOT}" )
set( _path "${_path}:${PNG_ROOT}" )
set( _path "${_path}:${HDF5_ROOT}" )
set( _path "${_path}:${BLAS_ROOT}" )
set( _path "${_path}:${LAPACK_ROOT}" )
set( ENV{CMAKE_PREFIX_PATH} "$ENV{CMAKE_PREFIX_PATH}:${_path}" )
unset( _path )
......
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
#
# Wrapper around CMake's built-in FindBLAS.cmake module. Making sure that
# the found include path and library directory are set up in a relocatable
# way.
#
# The LCG include(s):
include( LCGFunctions )
# Use the helper macro for the wrapping:
lcg_wrap_find_module( BLAS NO_LIBRARY_DIRS )
# Set up the RPM dependency:
lcg_need_rpm( blas )
......@@ -25,15 +25,22 @@ lcg_external_module( NAME CORAL
LIBRARY_SUFFIXES lib LIBRARY_PREFIX lcg_
COMPULSORY_COMPONENTS CoralBase )
# Ignore system paths when an LCG release was set up:
if( CORAL_ROOT )
set( _extraCoralArgs NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH )
endif()
# Find the python directory:
find_path( CORAL_PYTHON_PATH coral.py
PATH_SUFFIXES python PATHS ${CORAL_ROOT} )
PATH_SUFFIXES python PATHS ${CORAL_ROOT}
${_extraCoralArgs} )
set( CORAL_PYTHON_PATH ${CORAL_PYTHON_PATH}
${CORAL_LIBRARY_DIRS} )
# Find executables:
find_program( CORAL_coralServer_EXECUTABLE coralServer
PATH_SUFFIXES bin PATHS ${CORAL_ROOT} )
PATH_SUFFIXES bin PATHS ${CORAL_ROOT}
${_extraCoralArgs} )
mark_as_advanced( CORAL_coralServer_EXECUTABLE )
if( CORAL_coralServer_EXECUTABLE )
get_filename_component( CORAL_BINARY_PATH ${CORAL_coralServer_EXECUTABLE}
......@@ -49,3 +56,8 @@ mark_as_advanced( CORAL_FOUND CORAL_INCLUDE_DIR CORAL_INCLUDE_DIRS
# Set up the RPM dependency:
lcg_need_rpm( CORAL )
# Clean up:
if( _extraCoralArgs )
unset( _extraCoralArgs )
endif()
......@@ -19,8 +19,7 @@ include( LCGFunctions )
# Declare the external module:
lcg_external_module( NAME FFTW
INCLUDE_SUFFIXES include INCLUDE_NAMES fftw3.h
LIBRARY_SUFFIXES lib COMPULSORY_COMPONENTS fftw3f
EXTRA_OPTIONS NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH )
LIBRARY_SUFFIXES lib COMPULSORY_COMPONENTS fftw3f )
# Handle the standard find_package arguments:
include( FindPackageHandleStandardArgs )
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
#
# Locate the HDF5 external package. See
#
......@@ -32,6 +32,12 @@ set( HDF5_LCG_VERSION ${HDF5_VERSION} CACHE STRING
"HDF5's version in the LCG release" )
mark_as_advanced( HDF5_LCG_VERSION )
# And now un-set HDF5_VERSION completely. As it would prevent CMake's
# FindHDF5.cmake from working correctly in case we provide our own version of
# HDF5 instead of what LCG has to offer.
unset( HDF5_VERSION CACHE )
unset( HDF5_VERSION )
# Let the helper macro do most of the work. Note that while in some versions of
# CMake the built-in find-module seems to be setting HDF5_LIBRARY_DIRS, in other
# (newer) versions it doesn't. So to be safe, let's set it up ourselves all the
......
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
#
# Wrapper around CMake's built-in FindLAPACK.cmake module. Making sure that
# the found include path and library directory are set up in a relocatable
# way.
#
# The LCG include(s):
include( LCGFunctions )
# Use the helper macro for the wrapping:
lcg_wrap_find_module( LAPACK NO_LIBRARY_DIRS )
# Set up the RPM dependency:
lcg_need_rpm( lapack )