-
Notifications
You must be signed in to change notification settings - Fork 1.3k
cmake: Fix flex version check for overriding the register keyword #11302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In doxygen#11113 a check was added to override the "register" keyword for older versions of flex. The check was added before the find_package() call which resulted in the workaround being active for any version of flex. This breaks the build with recent mingw-w64 which uses "register" in its headers. Fix by moving the version check after the find_package() call.
Contributor
Author
Collaborator
|
Contributor
Author
https://sourceforge.net/p/mingw-w64/mailman/message/59112743/ For completeness:
$ cmake --version
cmake version 3.31.3
$ flex --version
flex 2.6.4
$ cmake . -Wno-dev
-- Building for: Ninja
-- The C compiler identification is Clang 19.1.6
-- The CXX compiler identification is Clang 19.1.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/msys64/clang64/bin/cc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/msys64/clang64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using Cmake version 3.31.3
-- Found Python: C:/Python312/python.exe (found version "3.12.7") found components: Interpreter
-- Found FLEX: C:/msys64/usr/bin/flex.exe (found version "2.6.4")
-- Found BISON: C:/msys64/usr/bin/bison.exe (found version "3.8.2")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Iconv: C:/msys64/clang64/lib/libiconv.dll.a (found version "1.18")
-- Build spdlog: 1.14.1
-- Build type: Release
-- The javacc executable not found, using existing files
-- The generateDS executable not found, using existing files
-- Configuring done (3.2s)
-- Generating done (0.1s)
-- Build files have been written to: C:/msys64/home/user/git/doxygen |
Collaborator
|
The test indeed looks like to be at the completely wrong place. |
Contributor
Author
|
Thank you! |
lazka
added a commit
to lazka/MINGW-packages
that referenced
this pull request
Dec 31, 2024
See doxygen/doxygen#11302 This means we can remove the revert from mingw-w64 headers which was using the register keyword.
lazka
added a commit
to msys2/MINGW-packages
that referenced
this pull request
Dec 31, 2024
See doxygen/doxygen#11302 This means we can remove the revert from mingw-w64 headers which was using the register keyword.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In #11113 a check was added to override the "register" keyword for older versions of flex. The check was added before the find_package() call which resulted in the workaround being active for any version of flex. This breaks the build with recent mingw-w64 which uses "register" in its headers.
Fix by moving the version check after the find_package() call.