[PATCH] D58619: [NFC][cmake] Build fix in tools/llvm-config/CMakeLists.txt

Gabor Buella via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 25 07:04:16 PST 2019


GBuella created this revision.
GBuella added a reviewer: tstellar.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.

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 \+


Repository:
  rL LLVM

https://reviews.llvm.org/D58619

Files:
  tools/llvm-config/CMakeLists.txt


Index: tools/llvm-config/CMakeLists.txt
===================================================================
--- tools/llvm-config/CMakeLists.txt
+++ tools/llvm-config/CMakeLists.txt
@@ -34,8 +34,8 @@
 # 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 "-std=[^ ]\+" LLVM_C_STD_FLAG ${CMAKE_C_FLAGS})
+string(REGEX MATCH "-std=[^ ]+" LLVM_CXX_STD_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})


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58619.188164.patch
Type: text/x-patch
Size: 772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190225/5d3ef673/attachment.bin>


More information about the llvm-commits mailing list