-
Notifications
You must be signed in to change notification settings - Fork 83
Link library whole archive doesn't work with CMake Ninja generator #442
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
Comments
I use the Ninja generator. What version of CMake are you using? The LINK_LIBRARY generator expression was added in CMake 3.24. |
This is with CMake from Ubuntu 22.04, curious that CI doesn't fail, i guess github are installing a new CMake from somewhere. $ cmake --version
cmake version 3.22.1 So it looks like we either need to
Note that the Qt online installer has 3.24 so developers can use that to retrieve the newer version. |
Although as detailed in the wasm issue a newer CMake doesn't work with the wasm target only x86_64. Wonder if this is due to the platforms that the CMake docs say are supported. Also note that it doesn't list MinGW ? Are there any other alternate ways of solving this? 🤔 |
That would require platform-specific code for Unix and Windows. :/
I'd prefer to do this.
Yeah, this seems to be a limitation in CMake currently. But it seems the platform linker does support it, just not CMake. |
Let's do this for now.
And can we |
required for linking with WHOLE_ARCHIVE https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html?highlight=whole_archive#genex:LINK_LIBRARY KDAB#442
required for linking with WHOLE_ARCHIVE https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html?highlight=whole_archive#genex:LINK_LIBRARY KDAB#442
required for linking with WHOLE_ARCHIVE https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html?highlight=whole_archive#genex:LINK_LIBRARY KDAB#442
required for linking with WHOLE_ARCHIVE https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html?highlight=whole_archive#genex:LINK_LIBRARY #442
Fixed in #445 wasm discussions can be in the other issue |
required for linking with WHOLE_ARCHIVE https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html?highlight=whole_archive#genex:LINK_LIBRARY KDAB#442
If you use
-G Ninja
then it doesn't understand theWHOLE_ARCHIVE
workaround ? Is there a way to make this work with Ninja too (seems some use--whole-archive
?) or do we need to look for an alternate route toWHOLE_ARCHIVE
?The text was updated successfully, but these errors were encountered: