-
-
Notifications
You must be signed in to change notification settings - Fork 566
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
build: impertively define output name for static library #392
Conversation
When building with an older CMake, the generator expression is not evaluated properly and embedded into the final output name which is incorrect. This should repair the ability to build with an older CMake.
CC: @mlocati |
It's not yet compiling on Debian Jessie. I tried it with Docker (start it with
|
I disagree with your assessment. Id say that it is building on the environment now. It is not able to build the tests currently as the tests are relying on C99 functionality but the compiler doesn't default to C99. That is a separate issue that I think we can fix. You should be able to work around that by passing in |
@jgm I'm not sure about your preference here. I think that this change is fairly standalone and fixes the Makefile generation issue. As to the C standard, I can put up a separate change to default that properly (and verify that the compiler supports the required standard mode). |
@mlocati what is the version of CMake that you are using? https://github.com/commonmark/cmark/blob/master/CMakeLists.txt#L16-L20 should ensure that the correct standard is used. https://cmake.org/cmake/help/latest/variable/CMAKE_C_STANDARD_REQUIRED.html indicates that this functionality was introduced in 3.1. @jgm what is the minimum version of CMake do you intend to support? https://github.com/commonmark/cmark/blob/master/CMakeLists.txt#L1 indicates 3.0 currently, which would mean that we should have some additional custom logic that you would need to maintain to test the various different compiler's level of language support. To me this seems a bit overkill as CMake 3.1 itself was released in 2014. |
At minimum, I'd like to support the version debian stable has. |
debian jessie had LTS support til the end of 2020. |
jessie has cmake 3.0.2. |
@jgm sounds like bumping the version to 3.7 at the very least is reasonable, though you said that cmake 3.18.4 is the version on the stable Debian above. 3.18 is a pretty respectable in terms of bug fixes. |
stretch has LTS til June 2022, so to be conservative 3.7 would be a good version to use, I would think. |
Yep, I can confirm that everything works now
|
OK, thanks for the patch and the tests. |
When building with an older CMake, the generator expression is not
evaluated properly and embedded into the final output name which is
incorrect. This should repair the ability to build with an older CMake.