Skip to content

Commit

Permalink
[NFC][cmake] Build fix in tools/llvm-config/CMakeLists.txt
Browse files Browse the repository at this point in the history
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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369887 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
GBuella committed Aug 26, 2019
1 parent c295640 commit ddcb2bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/llvm-config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ get_property(COMPILE_FLAGS TARGET llvm-config PROPERTY COMPILE_FLAGS)
# 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})
Expand Down

0 comments on commit ddcb2bb

Please sign in to comment.