Skip to content

CMAKE_PREFIX_PATH Handling Fix, master branch (2021.07.27.)

While working on !860 (merged) and athena!45438 (merged), I came across this issue.

Until now repeated calls to find_package(LCG...) would extend the CMAKE_PREFIX_PATH environment variable every time. Which could lead to a slight slowdown, as every find_package(...) call would need to evaluate a longer-than-necessary list. In practice LCG-dependent ATLAS projects would always call find_package(LCG...) twice before reading in the configuration of all of the packages. Which meant that a bunch of paths appeared twice in $ENV{CMAKE_PREFIX_PATH} while configuring the build of Athena.

With this update, the code should not do this anymore. I don't think it will cause any significant changes in the speed of running CMake, but it may still help a little.

Pinging @fwinkl for info.

Merge request reports