Skip to content

Revert "Remove redundant feature checks on re-run of CMake config ste…#2127

Merged
LebedevRI merged 1 commit intogoogle:mainfrom
dsharlet:main
Feb 17, 2026
Merged

Revert "Remove redundant feature checks on re-run of CMake config ste…#2127
LebedevRI merged 1 commit intogoogle:mainfrom
dsharlet:main

Conversation

@dsharlet
Copy link
Contributor

…p (#2084)"

This reverts commit 6a8dee9.

This commit has broken our build, e.g.:

-- Compiling and running to test GNU_POSIX_REGEX
CMake Error at build/linux/armhf/googlebenchmark-source/CMakeLists.txt:330 (message):
  Failed to determine the source files for the regular expression backend


-- Performing Test GNU_POSIX_REGEX -- failed
-- Compile Output: Change Dir: '/__w/XNNPACK/XNNPACK/build/linux/armhf/CMakeFiles/CMakeTmp'

Run Build Command(s): /usr/bin/ninja -v cmTC_0f13b
[1/2] ccache /usr/bin/arm-linux-gnueabihf-g++   -Wall  -Wextra  -Wshadow  -Wfloat-equal  -Wold-style-cast  -Wconversion  -Wformat=2  -Werror  -Wsuggest-override  -pedantic  -pedantic-errors  -fstrict-aliasing  -Wno-deprecated-declarations  -Wno-deprecated  -Wstrict-aliasing  -std=c++17 -o CMakeFiles/cmTC_0f13b.dir/gnu_posix_regex.cpp.o -c /__w/XNNPACK/XNNPACK/build/linux/armhf/googlebenchmark-source/cmake/gnu_posix_regex.cpp
FAILED: CMakeFiles/cmTC_0f13b.dir/gnu_posix_regex.cpp.o 
ccache /usr/bin/arm-linux-gnueabihf-g++   -Wall  -Wextra  -Wshadow  -Wfloat-equal  -Wold-style-cast  -Wconversion  -Wformat=2  -Werror  -Wsuggest-override  -pedantic  -pedantic-errors  -fstrict-aliasing  -Wno-deprecated-declarations  -Wno-deprecated  -Wstrict-aliasing  -std=c++17 -o CMakeFiles/cmTC_0f13b.dir/gnu_posix_regex.cpp.o -c /__w/XNNPACK/XNNPACK/build/linux/armhf/googlebenchmark-source/cmake/gnu_posix_regex.cpp
/__w/XNNPACK/XNNPACK/build/linux/armhf/googlebenchmark-source/cmake/gnu_posix_regex.cpp:1:10: fatal error: gnuregex.h: No such file or directory
    1 | #include <gnuregex.h>
      |          ^~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.


-- Feature POSIX_REGEX already disabled.

(https://github.com/google/XNNPACK/actions/runs/22084382825/job/63815804259)

This seems to affect most (maybe all) of our cross-compiled builds.

I've spent some time trying to fix this, and found some supsicious things (e.g. COMPILE_OUTPUT_VAR incompletely renamed) but unfortunately we don't have a good way to reproduce these cross-compile builds, so it is difficult to debug.

Considering the original commit was only an optimization of the build, I hope it will be acceptable to just revert it. I've verified that reverting this commit repairs our builds when updating this dependency.

This should reopen #2078

Copy link
Collaborator

@LebedevRI LebedevRI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is unfortunate, the old behaviour is annoying.
Thank you!

@LebedevRI LebedevRI merged commit 7da00e8 into google:main Feb 17, 2026
134 of 136 checks passed
@dsharlet
Copy link
Contributor Author

That is unfortunate, the old behaviour is annoying.

I think only the change to CMakeLists.txt is needed to fix the issue, and the change to CXXFeatureCheck.cmake is just a refactor (with probably a bug).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments