diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2017-06-07 17:34:10 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2017-06-07 17:52:40 (GMT) |
commit | 9c0d1e7531edbebc7943d5b981353b17631ed632 (patch) | |
tree | 2826ed8658792992952233b10d39056721b1825c /bootstrap | |
parent | 567bac890c060c56ff311bda24280873c8641b0a (diff) | |
download | CMake-9c0d1e7531edbebc7943d5b981353b17631ed632.zip CMake-9c0d1e7531edbebc7943d5b981353b17631ed632.tar.gz CMake-9c0d1e7531edbebc7943d5b981353b17631ed632.tar.bz2 |
bootstrap: implement cmake_extract_standard_flags() without loop
Pass all files to sed at once, and don't even change the directory for this.
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -9,11 +9,8 @@ die() { # Compile flag extraction function. cmake_extract_standard_flags() { - cd "${cmake_source_dir}/Modules/Compiler/" - for file in ${1:-*}-${2}.cmake; do - sed -n "s/ *set *( *CMAKE_${2}${3}_EXTENSION_COMPILE_OPTION *\"\{0,1\}\([^\")]*\).*/\1/p" \ - "${file}" | tr ';' ' ' - done + sed -n "s/ *set *( *CMAKE_${2}${3}_EXTENSION_COMPILE_OPTION *\"\{0,1\}\([^\")]*\).*/\1/p" \ + "${file}" "${cmake_source_dir}/Modules/Compiler/"${1:-*}-${2}.cmake 2>/dev/null | tr ';' ' ' } # Version number extraction function. |