From b9b0724de141696edf817fb032aa51daf699b48b Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Wed, 4 Oct 2023 23:10:02 +0200 Subject: [PATCH] CMake: fix RegularExpression::compile errors When the wxWidgets sources are in a path containing '++', CMake would show errors on the command line: [cmake] RegularExpression::compile(): Nested *?+. [cmake] RegularExpression::compile(): Error in compile This happens because the full path was interpreted as a regular expression when creating the source_groups. Without wxSOURCE_DIR the regular expressions still match and create correct source groups, so remove it. Closes #22738. Closes #23943. --- build/cmake/source_groups.cmake | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/build/cmake/source_groups.cmake b/build/cmake/source_groups.cmake index 5ac00c228a..b777c93446 100644 --- a/build/cmake/source_groups.cmake +++ b/build/cmake/source_groups.cmake @@ -11,22 +11,22 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) function(wx_set_source_groups) - source_group("Common Headers" REGULAR_EXPRESSION "${wxSOURCE_DIR}/include/wx/.*\\.h") - source_group("Common Sources" REGULAR_EXPRESSION "${wxSOURCE_DIR}/src/common/.*") - source_group("GTK+ Sources" REGULAR_EXPRESSION "${wxSOURCE_DIR}/src/gtk/.*") - source_group("MSW Sources" REGULAR_EXPRESSION "${wxSOURCE_DIR}/src/msw/.*") - source_group("OSX Sources" REGULAR_EXPRESSION "${wxSOURCE_DIR}/src/osx/.*") - source_group("Generic Sources" REGULAR_EXPRESSION "${wxSOURCE_DIR}/src/generic/.*") - source_group("wxUniv Sources" REGULAR_EXPRESSION "${wxSOURCE_DIR}/src/univ/.*") - source_group("wxHTML Sources" REGULAR_EXPRESSION "${wxSOURCE_DIR}/src/html/.*") - source_group("Setup Headers" REGULAR_EXPRESSION "${wxSOURCE_DIR}/include/.*/setup.h") - source_group("GTK+ Headers" REGULAR_EXPRESSION "${wxSOURCE_DIR}/include/wx/gtk/.*") - source_group("MSW Headers" REGULAR_EXPRESSION "${wxSOURCE_DIR}/include/wx/msw/.*") - source_group("OSX Headers" REGULAR_EXPRESSION "${wxSOURCE_DIR}/include/wx/osx/.*") - source_group("Generic Headers" REGULAR_EXPRESSION "${wxSOURCE_DIR}/include/wx/generic/.*") - source_group("wxUniv Headers" REGULAR_EXPRESSION "${wxSOURCE_DIR}/include/wx/univ/.*") - source_group("wxHTML Headers" REGULAR_EXPRESSION "${wxSOURCE_DIR}/include/wx/html/.*") + source_group("Common Headers" REGULAR_EXPRESSION "/include/wx/.*\\.h") + source_group("Common Sources" REGULAR_EXPRESSION "/src/common/.*") + source_group("GTK+ Sources" REGULAR_EXPRESSION "/src/gtk/.*") + source_group("MSW Sources" REGULAR_EXPRESSION "/src/msw/.*") + source_group("OSX Sources" REGULAR_EXPRESSION "/src/osx/.*") + source_group("Generic Sources" REGULAR_EXPRESSION "/src/generic/.*") + source_group("wxUniv Sources" REGULAR_EXPRESSION "/src/univ/.*") + source_group("wxHTML Sources" REGULAR_EXPRESSION "/src/html/.*") + source_group("Setup Headers" REGULAR_EXPRESSION "/include/.*/setup.h") + source_group("GTK+ Headers" REGULAR_EXPRESSION "/include/wx/gtk/.*") + source_group("MSW Headers" REGULAR_EXPRESSION "/include/wx/msw/.*") + source_group("OSX Headers" REGULAR_EXPRESSION "/include/wx/osx/.*") + source_group("Generic Headers" REGULAR_EXPRESSION "/include/wx/generic/.*") + source_group("wxUniv Headers" REGULAR_EXPRESSION "/include/wx/univ/.*") + source_group("wxHTML Headers" REGULAR_EXPRESSION "/include/wx/html/.*") source_group("Setup Headers" FILES ${wxSETUP_HEADER_FILE}) - source_group("Resource Files" REGULAR_EXPRESSION "${wxSOURCE_DIR}/[^.]*.(rc|ico|png|icns|manifest|plist)$") + source_group("Resource Files" REGULAR_EXPRESSION "/[^.]*.(rc|ico|png|icns|manifest|plist)$") source_group("CMake" REGULAR_EXPRESSION "(CMakeLists\\.txt|cmake_pch.*|.*_CXX_prefix\\.hxx\\.rule)$") endfunction()