summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/cmake.eclass6
1 files changed, 2 insertions, 4 deletions
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index e200b39432f..07216f0b9f5 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.eclass
@@ -254,10 +254,8 @@ _cmake_modify-cmakelists() {
while read -d '' -r file ; do
sed \
-e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_BUILD_TYPE\([[:space:]].*)\|)\)/I{s/^/#_cmake_modify_IGNORE /g}' \
- -e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_COLOR_MAKEFILE[[:space:]].*)/I{s/^/#_cmake_modify_IGNORE /g}' \
- -e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_INSTALL_PREFIX[[:space:]].*)/I{s/^/#_cmake_modify_IGNORE /g}' \
- -e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_VERBOSE_MAKEFILE[[:space:]].*)/I{s/^/#_cmake_modify_IGNORE /g}' \
- -i ${file} || die "${LINENO}: failed to disable hardcoded settings"
+ -e '/^[[:space:]]*set[[:space:]]*([[:space:]]*CMAKE_\(COLOR_MAKEFILE\|INSTALL_PREFIX\|VERBOSE_MAKEFILE\)[[:space:]].*)/I{s/^/#_cmake_modify_IGNORE /g}' \
+ -i ${file} || die "failed to disable hardcoded settings"
readarray -t mod_lines < <(grep -se "^#_cmake_modify_IGNORE" ${file})
if [[ ${#mod_lines[*]} -gt 0 ]]; then
einfo "Hardcoded definition(s) removed in ${file/${CMAKE_USE_DIR%\/}\//}:"