forked from TriBITSPub/TriBITS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Add failing test for enabling a subset of required subpackages i…
…n a parent package (TriBITSPub#299) This is the use case exercised by Albany/Trilinos in trilinos/Trilinos#9972 (and likely also Nalu/Trilinos in trilinos/Trilinos#9973). This test shows the same configure error where <Project>Config.cmake is trying to include an <SubPackage>Config.cmake file for a required subpackage that is not actually enabled.
- Loading branch information
1 parent
7aa68da
commit aff16ca
Showing
2 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# CMake -P script to repalce a string in a text file with another string. | ||
# | ||
# Usage: | ||
# | ||
# cmake -D FILE=<file> -D STRING_TO_REPLACE="<str-to-replace>" \ | ||
# -D REPLACEMENT_STRING="<replacement-string" \ | ||
# -P replace_string.cmake | ||
# | ||
|
||
# Echo input args | ||
message("FILE = '${FILE}'") | ||
message("STRING_TO_REPLACE = '${STRING_TO_REPLACE}'") | ||
message("REPLACEMENT_STRING = '${REPLACEMENT_STRING}'") | ||
|
||
file(READ "${FILE}" fileContentsStr) | ||
string(REPLACE "${STRING_TO_REPLACE}" "${REPLACEMENT_STRING}" | ||
fileContentsStr "${fileContentsStr}") | ||
file(WRITE "${FILE}" "${fileContentsStr}") |