Skip to content

Commit f454e23

Browse files
authored
Fix a CMake warning on release builds
It looks like this isn't a regression - all previous releases had this issue. We simply didn't use the "-Werror=dev" flag before when testing CMake. If the "pcre2_prerelease" variable was set to empty string, it would be treated as "falsy" by CMake and not substituted correctly.
1 parent b0b6ebb commit f454e23

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -733,10 +733,9 @@ set(
733733
foreach(configure_line ${configure_lines})
734734
foreach(substitution_variable ${SEARCHED_VARIABLES})
735735
string(TOUPPER ${substitution_variable} substitution_variable_upper)
736-
if(NOT ${substitution_variable_upper})
737-
string(REGEX MATCH "m4_define\\(${substitution_variable}, *\\[(.*)\\]" MATCHED_STRING ${configure_line})
738-
if(CMAKE_MATCH_1)
739-
set(${substitution_variable_upper} ${CMAKE_MATCH_1})
736+
if(NOT DEFINED ${substitution_variable_upper})
737+
if("${configure_line}" MATCHES "m4_define\\(${substitution_variable}, *\\[(.*)\\]")
738+
set(${substitution_variable_upper} "${CMAKE_MATCH_1}")
740739
endif()
741740
endif()
742741
endforeach()

0 commit comments

Comments
 (0)