Skip to content

Commit

Permalink
Merge pull request #4367 from timokoch/fix/cmake-restore-cmake-module…
Browse files Browse the repository at this point in the history
…-path

[cmake] Restore CMAKE_MODULE_PATH after temporary modification
  • Loading branch information
blattms authored Dec 4, 2024
2 parents f47b825 + 32aec17 commit 268f5b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake/Templates/opm-project-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,16 @@ if(NOT @opm-project_NAME@_FOUND)
find_package(opm-common CONFIG)
endif()
# This is required to include OpmPackage /opm-common-prereq.cmake
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" @PREREQ_LOCATION@)
list(PREPEND CMAKE_MODULE_PATH @PREREQ_LOCATION@)

# extra code from variable OPM_PROJECT_EXTRA_CODE
@OPM_PROJECT_EXTRA_CODE@
# end extra code

include(OpmPackage)
include(@opm-project_NAME@-prereqs)

# remove the temporarily added path again to not pollute downstream modules
list(POP_FRONT CMAKE_MODULE_PATH)
endif()
endif()

0 comments on commit 268f5b8

Please sign in to comment.