Skip to content
Snippets Groups Projects
Commit fd69f284 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Correctly set Gaudi_VERSION when building as a subproject

See merge request !1718
parents 89f38fab 62930bd1
No related branches found
No related tags found
1 merge request!1718Correctly set Gaudi_VERSION when building as a subproject
Pipeline #11674020 passed
...@@ -206,6 +206,11 @@ if(NOT PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME) # If we are building the full s ...@@ -206,6 +206,11 @@ if(NOT PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME) # If we are building the full s
# but we add Gaudi's CMake modules to the CMAKE_MODULE_PATH for downstream projects # but we add Gaudi's CMake modules to the CMAKE_MODULE_PATH for downstream projects
list(PREPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) list(PREPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE)
# Set the version of the project as a cache variable to be seen by other
# projects in the same super-project.
set(${PROJECT_NAME}_VERSION "${PROJECT_VERSION}" CACHE STRING "Version of ${PROJECT_NAME}" FORCE)
return() return()
endif() endif()
...@@ -277,10 +282,6 @@ set(CPACK_SOURCE_IGNORE_FILES "/InstallArea/;/build\\\\..*/;/\\\\.git/;/\\\\.git ...@@ -277,10 +282,6 @@ set(CPACK_SOURCE_IGNORE_FILES "/InstallArea/;/build\\\\..*/;/\\\\.git/;/\\\\.git
set(CPACK_SOURCE_GENERATOR "ZIP;RPM") set(CPACK_SOURCE_GENERATOR "ZIP;RPM")
include(CPack) include(CPack)
# Set the version of the project as a cache variable to be seen by other
# projects in the same super-project.
set(${PROJECT_NAME}_VERSION "${PROJECT_VERSION}" CACHE STRING "Version of ${PROJECT_NAME}" FORCE)
# Optionally enable compatibility with old-style CMake configurations, via helper module # Optionally enable compatibility with old-style CMake configurations, via helper module
option(GAUDI_LEGACY_CMAKE_SUPPORT "Enable compatibility with old-style CMake builds" "$ENV{GAUDI_LEGACY_CMAKE_SUPPORT}") option(GAUDI_LEGACY_CMAKE_SUPPORT "Enable compatibility with old-style CMake builds" "$ENV{GAUDI_LEGACY_CMAKE_SUPPORT}")
if(GAUDI_LEGACY_CMAKE_SUPPORT) if(GAUDI_LEGACY_CMAKE_SUPPORT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment