[llvm] r369887 - [NFC][cmake] Build fix in tools/llvm-config/CMakeLists.txt
Gabor Buella via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 26 02:42:31 PDT 2019
Author: gbuella
Date: Mon Aug 26 02:42:30 2019
New Revision: 369887
URL: http://llvm.org/viewvc/llvm-project?rev=369887&view=rev
Log:
[NFC][cmake] Build fix in tools/llvm-config/CMakeLists.txt
To avoid the following error message (using cmake version 3.13.4) :
```
CMake Error at tools/llvm-config/CMakeLists.txt:37 (string):
Syntax error in cmake code when parsing string-std=[^ ]\+Invalid escape sequence \+
```
Reviewed By: mgorny
Differential Revision: https://reviews.llvm.org/D58619
Modified:
llvm/trunk/tools/llvm-config/CMakeLists.txt
Modified: llvm/trunk/tools/llvm-config/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config/CMakeLists.txt?rev=369887&r1=369886&r2=369887&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-config/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-config/CMakeLists.txt Mon Aug 26 02:42:30 2019
@@ -34,9 +34,9 @@ get_property(COMPILE_FLAGS TARGET llvm-c
# NOTE: We don't want to start extracting any random C/CXX flags that the
# user may add that could affect the ABI. We only want to extract flags
# that have been added by the LLVM build system.
-string(REGEX MATCH "-std=[^ ]\+" LLVM_CXX_STD_FLAG ${CMAKE_CXX_FLAGS})
-string(REGEX MATCH "-stdlib=[^ ]\+" LLVM_CXX_STDLIB_FLAG ${CMAKE_CXX_FLAGS})
-string(REGEX MATCH "-std=[^ ]\+" LLVM_C_STD_FLAG ${CMAKE_C_FLAGS})
+string(REGEX MATCH "-std=[^ ]+" LLVM_CXX_STD_FLAG ${CMAKE_CXX_FLAGS})
+string(REGEX MATCH "-stdlib=[^ ]+" LLVM_CXX_STDLIB_FLAG ${CMAKE_CXX_FLAGS})
+string(REGEX MATCH "-std=[^ ]+" LLVM_C_STD_FLAG ${CMAKE_C_FLAGS})
# Use configure_file to create BuildVariables.inc.
set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR})
More information about the llvm-commits
mailing list