Commit 2d2a5903 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

added consistency check on the toolchain version of used projects

parent 42cb7934
......@@ -318,6 +318,19 @@ macro(_gaudi_use_other_projects)
find_package(${other_project} ${other_project_cmake_version} HINTS ..)
if(${other_project}_FOUND)
message(STATUS " found ${other_project} ${${other_project}_VERSION} ${${other_project}_DIR}")
if(NOT heptools_version STREQUAL ${other_project}_heptools_version)
if(${other_project}_heptools_version)
set(hint_message "with the option '-DCMAKE_TOOLCHAIN_FILE=.../heptools-${${other_project}_heptools_version}.cmake'")
else()
set(hint_message "without the option '-DCMAKE_TOOLCHAIN_FILE=...'")
endif()
message(FATAL_ERROR "Incompatible versions of heptools toolchains:
${CMAKE_PROJECT_NAME} -> ${heptools_version}
${other_project} ${${other_project}_VERSION} -> ${${other_project}_heptools_version}
You need to call cmake ${hint_message}
")
endif()
include_directories(${${other_project}_INCLUDE_DIRS})
set(binary_paths ${${other_project}_BINARY_PATH})
foreach(exported ${${other_project}_EXPORTED_SUBDIRS})
......@@ -1201,7 +1214,7 @@ macro(gaudi_generate_project_config_file)
message(STATUS "Generating ${CMAKE_PROJECT_NAME}Config.cmake")
file(WRITE ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake
"# File automatically generated: DO NOT EDIT.
set(LCG_version ${LCG_version})
set(${CMAKE_PROJECT_NAME}_heptools_version ${heptools_version})
if(IS_DIRECTORY \${${CMAKE_PROJECT_NAME}_DIR}/InstallArea/\${LCG_platform}/cmake)
list(INSERT CMAKE_MODULE_PATH 0 \${${CMAKE_PROJECT_NAME}_DIR}/InstallArea/\${LCG_platform}/cmake)
......
......@@ -4,7 +4,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/heptools-common.cmake)
# please keep alphabetic order and the structure (tabbing).
# it makes it much easier to edit/read this file !
set(LCG_config_version 60b)
set(heptools_version 60b)
LCG_AA_project(COOL COOL_2_8_9a)
LCG_AA_project(CORAL CORAL_2_3_15)
......
......@@ -4,7 +4,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/heptools-common.cmake)
# please keep alphabetic order and the structure (tabbing).
# it makes it much easier to edit/read this file !
set(LCG_config_version 61b)
set(heptools_version 61b)
LCG_AA_project(COOL COOL_2_8_11a)
LCG_AA_project(CORAL CORAL_2_3_19)
......
......@@ -4,7 +4,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/heptools-common.cmake)
# please keep alphabetic order and the structure (tabbing).
# it makes it much easier to edit/read this file!
set(LCG_config_version 62a)
set(heptools_version 62a)
# Application Area Projects
LCG_AA_project(COOL COOL_2_8_12)
......
......@@ -4,7 +4,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/heptools-common.cmake)
# please keep alphabetic order and the structure (tabbing).
# it makes it much easier to edit/read this file!
set(LCG_config_version 62b)
set(heptools_version 62b)
# Application Area Projects
LCG_AA_project(COOL COOL_2_8_13)
......
......@@ -117,7 +117,7 @@ LCG_prepare_paths()"""
yield self.__header__
# first let's get rid of the special ones
yield "set(LCG_config_version %s)" % versions.pop("LCG")
yield "set(heptools_version %s)" % versions.pop("LCG")
yield "\n# Application Area Projects"
for name in self.__AA_projects__:
......
Supports Markdown
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