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

Remove all links that point to CMake use in a non-modern way. #16

Closed
onqtam opened this issue Feb 20, 2018 · 7 comments · Fixed by #42
Closed

Remove all links that point to CMake use in a non-modern way. #16

onqtam opened this issue Feb 20, 2018 · 7 comments · Fixed by #42

Comments

@onqtam
Copy link
Owner

onqtam commented Feb 20, 2018

Perhaps not right now but in a few months there should be a cleanup - its high time everybody upgraded to at least version 3

@waldyrious
Copy link

waldyrious commented Feb 22, 2018

For reference, according to https://repology.org/metapackage/cmake/versions, the only (major) distros where the default CMake package is older than 3 are CentOS 6/7 (CMake v2.8.12.2 in both) and Ubuntu 12.04 (CMake v2.8.7; the release is in extended security maintenance until April 2019 for Ubuntu Advantage customers).

Note: Ubuntu 14.04's "cmake" package is at 2.8.12.2, but a "cmake3" package (v3.5.1) is available in the "universe" repository, so I guess that doesn't count.

@bobeff
Copy link
Contributor

bobeff commented Apr 19, 2018

I think that the old not target based way of using CMake, despite considered a bad practice, is still a valid way, and there is no reason to remove the links. Maybe only adding some kind of deprecated tag or separating them in subsection about CMake 2.x will be enough?

@onqtam
Copy link
Owner Author

onqtam commented Apr 19, 2018

I think old cruft has to go. The target-based way is much more concise and dependencies are better understood and easily maintained.

@gajop
Copy link

gajop commented Jun 19, 2018

However I would appreciate links that demonstrate how we can convert the old format to the more modern style. Looking at the CMake code in some Open Source projects I contribute to, it's a pretty daunting task.

It's a sad state of affairs that the official CMake tutorial (https://cmake.org/cmake-tutorial/) uses 2.6.

@bobeff
Copy link
Contributor

bobeff commented Jun 21, 2018

Discussion about old CMake deprecation on Reddit, with one of the authors of CMake.

@gajop
Copy link

gajop commented Jun 22, 2018

That's sad. C++ build / package systems are a real problem (take it from Bjarne Stroustrup, not me), and in desperate need of modernizing.
Why don't they allow us to deprecate bad/ugly commands by specifying it as a flag? :(

@DaelDe
Copy link
Contributor

DaelDe commented Sep 14, 2018

@gajop another way is to employ static analysis on CMake files. We do this in our company to continuously check ~1000 files and report violations (e.g. non-modern).

We use cmake_check for that purpose. The tool will grow but you can already scan a full tree and report forbidden usage.

Lectem added a commit to Lectem/awesome-cmake that referenced this issue Apr 10, 2020
 onqtam#16

onqtam#16 asked to clean up the list and remove links that refer to material that does not follow modern cmake standards.

I moved anything that either uses (except to say it's wrong) one of the following commands:

- include_directories
- add_definitions
- add_compile_options

Same thing if the project tries to set CMAKE_<LANG>_FLAGS.

I did not remove modules repositories links unless they use the above in the README or examples.
onqtam pushed a commit that referenced this issue May 21, 2020
 #16 (#42)

#16 asked to clean up the list and remove links that refer to material that does not follow modern cmake standards.

I moved anything that either uses (except to say it's wrong) one of the following commands:

- include_directories
- add_definitions
- add_compile_options

Same thing if the project tries to set CMAKE_<LANG>_FLAGS.

I did not remove modules repositories links unless they use the above in the README or examples.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants