Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake fixes: #3437

Merged
merged 4 commits into from
Apr 26, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions dependencies/FindVGM.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright CERN and copyright holders of ALICE O2. This software is distributed
# under the terms of the GNU General Public License v3 (GPL Version 3), copied
# verbatim in the file "COPYING".
#
# See http://alice-o2.web.cern.ch/license for full licensing information.
#
# In applying this license CERN does not waive the privileges and immunities
# granted to it by virtue of its status as an Intergovernmental Organization or
# submit itself to any jurisdiction.

# use the VGMConfig.cmake provided by the VGM installation but
# amend the target VGM::XmlVGM with the include and link directories

find_package(VGM NO_MODULE)
if(NOT VGM_FOUND)
return()
endif()

# VGM uses namespace since 4.7
message(STATUS ${VGM_VERSION})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the message intended or a leftover from the testing phase ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was for debugging; I will remove it.

if(${VGM_VERSION} VERSION_LESS "4.7")
set(targetVGM XmlVGM)
else()
set(targetVGM VGM::XmlVGM)
endif()

set_target_properties(${targetVGM}
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${VGM_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES
$<TARGET_FILE_DIR:${targetVGM}>)
7 changes: 6 additions & 1 deletion dependencies/O2SimulationDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,20 @@ set_package_properties(Geant3
PROPERTIES
TYPE ${mcPackageRequirement} DESCRIPTION
"the legacy but not slow MC transport engine")

find_package(Geant4 MODULE)
set_package_properties(Geant4
PROPERTIES
TYPE ${mcPackageRequirement} DESCRIPTION
"more recent and more complete MC transport engine")


find_package(Geant4VMC MODULE)
set_package_properties(Geant4VMC PROPERTIES TYPE ${mcPackageRequirement})
find_package(VGM CONFIG)

find_package(VGM MODULE)
set_package_properties(VGM PROPERTIES TYPE ${mcPackageRequirement})

find_package(HepMC MODULE)
set_package_properties(HepMC
PROPERTIES
Expand Down
2 changes: 1 addition & 1 deletion tests/test-root-macro.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ COMPILE=$2
INCPATH=$3
LIBPATH=$4

LIBPATH=@CMAKE_LIBRARY_OUTPUT_DIRECTORY@:@LD_LIBRARY_PATH@:${LIBPATH}
LIBPATH=@CMAKE_LIBRARY_OUTPUT_DIRECTORY@:${LIBPATH}
LIBPATH=${LIBPATH//::/:}

[[ -z "$INCPATH" ]] && INCPATH=$ROOT_INCLUDE_PATH
Expand Down