From a3c4bad6c822f84a2fa19893cf16afe22103eb1f Mon Sep 17 00:00:00 2001 From: dberzano Date: Mon, 2 Feb 2015 18:34:36 +0100 Subject: [PATCH] CMake: fixed compat problem with CMake v2.8.11 --- CMakeLists.txt | 2 +- cmake/CMakeALICE.cmake | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 91d2c9bfc8d..fcc380cb816 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,7 +118,7 @@ set(ALIROOT_STATIC CACHE STRING "ENABLE static building of AliRoot: ON") if(DA) if(NOT DIMDIR AND NOT ODIR) set(DA FALSE) - message(FATAL_ERROR "Das enabled but no DIMDIR and ODIR set. Please set DIMDIR to DIM installation and ODIR to platform (default linux)") + message(FATAL_ERROR "DAs enabled but no DIMDIR and ODIR set. Please set DIMDIR to DIM installation and ODIR to platform (default linux)") endif() if(NOT DATE_FOUND) diff --git a/cmake/CMakeALICE.cmake b/cmake/CMakeALICE.cmake index c8f0e24a08b..8bc298e9631 100644 --- a/cmake/CMakeALICE.cmake +++ b/cmake/CMakeALICE.cmake @@ -311,7 +311,11 @@ function(install_relative) # Prepare a distinct install command for each file, depending on its path foreach(_FILE ${_FILES}) - get_filename_component(_FILEPREFIX ${_FILE} DIRECTORY) + if(CMAKE_VERSION VERSION_GREATER "2.8.11") + get_filename_component(_FILEPREFIX ${_FILE} DIRECTORY) + else() + get_filename_component(_FILEPREFIX ${_FILE} PATH) + endif() #message(STATUS "[install_relative] ${_FILE} --> ${_FILEPREFIX}") string(SUBSTRING ${_FILE} 0 1 _FILE_FIRST) -- 2.43.0