Skip to content

Commit 4e1847f

Browse files
authored
Merge pull request #19 from rsps/fix-cmake-module-path
Fix cmake module path
2 parents 3613f91 + d8cf81d commit 4e1847f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Fixed
1515

16+
* `CMAKE_MODULE_PATH` changes are not propagated to the top-most project, when "CMake Scripts" is included by other project as a nested dependency.
1617
* Release (_version_) links in `CHANGELOG.md`.
1718

1819
## [v0.1.0] - 2025-02-13

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ option(RSP_ENABLE_ANSI "Enable ANSI output" false)
1515
list(FIND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" has_cmake_scripts_module_path)
1616
if(has_cmake_scripts_module_path EQUAL -1)
1717
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
18+
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" CACHE STRING " RSP CMake Scripts CMAKE_MODULE_PATH" FORCE)
19+
20+
message(WARNING "Caching CMAKE_MODULE_PATH. Please rebuild your project, if a failure occur.")
1821
endif()
1922

2023
# Abort if building in-source

0 commit comments

Comments
 (0)