Commit 01149453 authored by Andrea Valassi's avatar Andrea Valassi
Browse files

Remove Boost handling from CMake according to Pere's lcgcmake fix (SPI-842).

Pass extra Boost variables in setup as in lcgcmake for non-lcgcmake builds.


git-svn-id: file:///git/lcgcool.svndb/cool/trunk@20173 4525493e-7705-40b1-a816-d608a930855b
parent b7638d73
......@@ -45,28 +45,6 @@ message(STATUS "=============================================")
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
# Workarounds for lcgcmake without HEPToolsMacros.cmake
# See CORALCOOL-2806 (1.59) and CORALCOOL-2903 (1.61)
# See also CORALCOOL-2846 for how this is likely to change eventually
set(Boost_ADDITIONAL_VERSIONS "1.59.0" "1.59" "1.61.0" "1.61")
# Workaround for CORALCOOL-2806 (CMAKE_COMPILER_IS_GNUCXX not set on Mac/clang)
IF(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin")
set(Boost_COMPILER "-xgcc42")
# Workaround for SPI-842 (Boost tag is -clang39 for clang39 builds)
ELSEIF(BINARY_TAG MATCHES "clang39")
set(Boost_COMPILER "-clang39")
# Workaround for SPI-842 (Boost tag is -clang38 for clang38 builds)
ELSEIF(BINARY_TAG MATCHES "clang38")
set(Boost_COMPILER "-clang38")
# Workaround for SPI-842 (Boost tag is -clang37 for clang37 builds)
ELSEIF(BINARY_TAG MATCHES "clang37")
set(Boost_COMPILER "-clang37")
# Workaround for SPI-842 and CORALCOOL-2797 (Boost tag is -il for icc15 builds)
ELSEIF(BINARY_TAG MATCHES "icc")
set(Boost_COMPILER "-il")
ENDIF()
# Print out a banner after any other targets are built
# Add a dependency of this target on all other targets of this project
# See http://stackoverflow.com/questions/25240105/
......
......@@ -204,7 +204,28 @@ elif [[ $BINARY_TAG == *clang37* ]]; then # See CORALCOOL-2821
fi
#-------------------------------------------------------------------------------
# Set up Cmake
# Set up Boost extra configuration for CMake as in lcgcmake (SPI-842)
#-------------------------------------------------------------------------------
# Follow the same logic as in lcgcmake/cmake/toolchain/heptools-common.cmake
# See CORALCOOL-2806 (mac), SPI-842 (clang) and CORALCOOL-2797 (icc)
if [[ $BINARY_TAG == *mac* ]]; then
Boost_COMPILER="-DBoost_COMPILER=-xgcc42"
elif [[ $BINARY_TAG == *clang* ]]; then
Boost_COMPILER=${BINARY_TAG%-*}
Boost_COMPILER="-DBoost_COMPILER=-${Boost_COMPILER#*-*-}"
elif [[ $BINARY_TAG == *icc* ]]; then
Boost_COMPILER="-DBoost_COMPILER=-il"
else
Boost_COMPILER=
fi
# Always add Boost 1.59 (LCG80-84) and 1.61 (LCG85 and above)
# See CORALCOOL-2806 (1.59) and CORALCOOL-2903 (1.61)
Boost_extra_configuration="-DBoost_NO_BOOST_CMAKE=ON -DBoost_ADDITIONAL_VERSIONS=1.59.0 1.59 1.61.0 1.61 $Boost_COMPILER"
#-------------------------------------------------------------------------------
# Set up CMake
#-------------------------------------------------------------------------------
# Use the installation in the LCG release if it exists (CORALCOOL-2846)
......@@ -282,6 +303,10 @@ CMAKEFLAGS="-DCMAKE_CXX_FLAGS=$CMAKE_CXX_FLAGS $CMAKEFLAGS"
# See https://github.com/ninja-build/ninja/issues/900
###CMAKEFLAGS="-DCMAKE_VERBOSE_MAKEFILE=ON $CMAKEFLAGS"
# Set Boost_ADDITIONAL_VERSIONS, Boost_COMPILER, Boost_NO_BOOST_CMAKE
# [These are CMake standard variables]
CMAKEFLAGS="$Boost_extra_configuration $CMAKEFLAGS"
# Enable ccache by default
# [This is a CORAL/COOL variable, not a CMake standard variable]
CMAKEFLAGS="-DCMAKE_USE_CCACHE=ON $CMAKEFLAGS"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment