Skip to content
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

Update CMakeLists.txt #393

Merged
merged 1 commit into from
Aug 22, 2021
Merged

Update CMakeLists.txt #393

merged 1 commit into from
Aug 22, 2021

Conversation

compnerd
Copy link
Contributor

Bump the minimum required CMake to 3.7. CMake 3.1 is required for the CMAKE_C_STANDARD and CMAKE_C_STANDARD_REQUIRED options to take effect. Relying on CMake to control the compiler this way allows us to avoid having to rebuild the logic for detecting the appropriate flags and ensuring that the compiler is able to support the necessary language version.

Bump the minimum required CMake to 3.7.  CMake 3.1 is required for the `CMAKE_C_STANDARD` and `CMAKE_C_STANDARD_REQUIRED` options to take effect.  Relying on CMake to control the compiler this way allows us to avoid having to rebuild the logic for detecting the appropriate flags and ensuring that the compiler is able to support the necessary language version.
@compnerd
Copy link
Contributor Author

@jgm this is a follow up from the discussion that occurred in #392. By bumping the CMake version, we can ensure that the compiler is properly used by the build.

@jgm
Copy link
Member

jgm commented Aug 21, 2021

Are there associated changes you'd make if the version is bumped?
Maybe they should be added here?
Otherwise I don't see why we should gratuitously bump the version; that just makes it not work for certain users without providing any advantage to anyone.

@compnerd
Copy link
Contributor Author

No, the desired change is already in the tree here:
https://github.com/commonmark/cmark/blob/master/CMakeLists.txt#L17-L19

Id say that we could bump to 3.1 if you prefer, but it seems unnecessarily low. I would actually suggest that we should bump to 3.18 and then roll back to the more declarative based CMake with generator expressions. However, this change conservatively bumps the version to ensure that the compiler flags for the language version are setup properly.

@jgm jgm merged commit 077736e into commonmark:master Aug 22, 2021
@jgm
Copy link
Member

jgm commented Aug 22, 2021

got it, thanks

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