Skip to content

Commit

Permalink
CMake: Use find_package(2) to find fmt, boost
Browse files Browse the repository at this point in the history
  • Loading branch information
olantwin committed Oct 3, 2024
1 parent 39cffc7 commit 2eb7c79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ it in future.
* Decay Vessel configuration now imported from a yaml file
* Geometry of Decay Vessel updated to new design
* Housekeeping: Bump minimum CMake version to 3.12
* Housekeeping: Use FairRoot's `find_package2` to find ROOT and VMC
* Housekeeping: Use FairRoot's `find_package2` to find ROOT, VMC, fmt
* Housekeeping: Bump minimum ROOT version to 6.26
* Housekeeping: Use find_package to find BOOST

### Removed

Expand Down
16 changes: 2 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ find_package2(PUBLIC GEANT4)
find_package2(PUBLIC GEANT4DATA)
find_package2(PUBLIC GEANT4VMC)
find_package2(PUBLIC HEPMC)
find_package2(PUBLIC fmt)
find_package2(PUBLIC FairRoot REQUIRED)
find_package2(PUBLIC FairLogger REQUIRED)
find_package2(PUBLIC VMC REQUIRED)
Expand All @@ -144,20 +145,7 @@ IF(DEFINED $ENV{GSL_ROOT})
set(GSL_DIR $ENV{GSL_ROOT})
ENDIF(DEFINED $ENV{GSL_ROOT})

Message("-- Looking for Boost ...")
# If an older version of boost is found both of the variables below are
# cached and in a second cmake run, a good boost version is found even
# if the version is to old.
# To overcome this problem both variables are cleared before checking
# for boost.
Unset(Boost_INCLUDE_DIR CACHE)
Unset(Boost_LIBRARY_DIRS CACHE)
find_package(Boost 1.41)
If (Boost_FOUND)
Set(Boost_Avail 1)
Else (Boost_FOUND)
Set(Boost_Avail 0)
EndIf (Boost_FOUND)
find_package(Boost 1.70 REQUIRED)

# set a variable which should be used in all CMakeLists.txt
# Defines all basic include directories from fairbase
Expand Down

0 comments on commit 2eb7c79

Please sign in to comment.