Skip to content
Snippets Groups Projects
Commit 372de00e authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

WorkDir: Set VERSION to same value as parent project

This is a follow-up to MR !30019 where the `WorkDir` version was
hard-coded to `1.0.0`. But some of our cmake code relies on the
`CMAKE_PROJECT_VERSION` variable to be set to the same value as the
parent project. Achieve this by calling `project(...)` twice. First
without version, then a second time once we know the parent version
number.

Also remove the obsolete Doxygen work-around.
parent 508dcb82
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!30035WorkDir: Set VERSION to same value as parent project
......@@ -6,7 +6,9 @@
# Set up the project.
cmake_minimum_required( VERSION 3.6 )
project( WorkDir VERSION 1.0.0 LANGUAGES C CXX )
# Note that there is a second `project` call further below to set
# the version and languages.
project( WorkDir )
# Let the user pick up updated AtlasCMake/AtlasLCG versions for testing.
# Remember that it's not a problem if AtlasCMake is not found, that's why
......@@ -39,11 +41,6 @@ option( ATLAS_USE_FORTRAN
"Whether the WorkDir project should provide support for Fortran"
${_defaultUseFortran} )
# If Fortran is needed, enable it now.
if( ATLAS_USE_FORTRAN )
enable_language( Fortran )
endif()
# Clean up:
unset( _parentProjectNames )
unset( _defaultParentProject )
......@@ -52,11 +49,6 @@ unset( _defaultUseFortran )
# Find the project that we depend on:
find_package( ${ATLAS_PROJECT} REQUIRED )
# Temporary fix for ATLINFR-2883:
if ( DOXYGEN_FOUND )
find_package( graphviz )
endif()
# Set up CTest:
atlas_ctest_setup()
......@@ -65,10 +57,16 @@ atlas_ctest_setup()
set( CMAKE_EXPORT_COMPILE_COMMANDS TRUE CACHE BOOL
"Create compile_commands.json" FORCE )
# Set up a work directory project:
# Set up a work directory project with the same version as our parent:
project( WorkDir VERSION ${${ATLAS_PROJECT}_VERSION} LANGUAGES C CXX )
atlas_project( USE ${ATLAS_PROJECT} ${${ATLAS_PROJECT}_VERSION}
PROJECT_ROOT ${CMAKE_SOURCE_DIR}/../../ )
# If Fortran is needed, enable it now.
if( ATLAS_USE_FORTRAN )
enable_language( Fortran )
endif()
# Set up the runtime environment setup script(s):
lcg_generate_env( SH_FILE ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/env_setup.sh )
install( FILES ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/env_setup.sh
......
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