Skip to content

Commit

Permalink
Fix escaping of brackets in regex in CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperrealm committed Nov 23, 2022
1 parent 14ce49b commit ebd0866
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.1)

# Extract version from configure.ac.
set(VERSION_REGEX "^AC_INIT\\(\[libconfig\],[ \t]*\[([0-9.]+)\],.*")
set(VERSION_REGEX "^AC_INIT\\(\\[libconfig\\],[ \t]*\\[([0-9.]+)\\],.*")
file(STRINGS "configure.ac"
VERSION_STRING REGEX ${VERSION_REGEX})
string(REGEX REPLACE ${VERSION_REGEX} "\\1" VERSION_STRING "${VERSION_STRING}")
Expand Down

0 comments on commit ebd0866

Please sign in to comment.