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

Require C++11 and CMake 3.10 #1915

Merged
merged 4 commits into from Mar 5, 2020
Merged

Conversation

akohlmey
Copy link
Member

@akohlmey akohlmey commented Mar 4, 2020

Summary

This adds tests and documents the new requirements for C++ compiler and CMake.

Related Issues

Closes #1659
Closes #1729

Author(s)

Axel Kohlmeyer (Temple U)

Licensing

By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).

Backward Compatibility

This deliberately breaks compatibility with old compilers and CMake versions

Post Submission Checklist

  • The feature or features in this pull request is complete
  • Licensing information is complete
  • Corresponding author information is complete
  • The source code follows the LAMMPS formatting guidelines
  • Suitable new documentation files and/or updates to the existing docs are included
  • The added/updated documentation is integrated and tested with the documentation build system
  • The feature has been verified to work with the conventional build system
  • The feature has been verified to work with the CMake based build system

@akohlmey akohlmey added this to the Stable Release Summer 2020 milestone Mar 4, 2020
@akohlmey akohlmey self-assigned this Mar 4, 2020
@akohlmey akohlmey requested a review from sjplimp March 4, 2020 19:42
@akohlmey akohlmey added el7 and removed el7 labels Mar 4, 2020
@junghans
Copy link
Member

junghans commented Mar 4, 2020

With cmake-3.10 we can also get rid of LAMMPS_LINK_LIBS and LMP_SOURCES as one can simply create the library/executable target at the beginning of the CMake file with e.g. add_excutable(lmp) (no source files) and then add source files with target_sources(lmp foo.cpp), similar for linking with target_link_libraries(lmp foo::foo).

@akohlmey
Copy link
Member Author

akohlmey commented Mar 4, 2020

With cmake-3.10 we can also get rid of LAMMPS_LINK_LIBS and LMP_SOURCES as one can simply create the library/executable target at the beginning of the CMake file with e.g. add_excutable(lmp) (no source files) and then add source files with target_sources(lmp foo.cpp), similar for linking with target_link_libraries(lmp foo::foo).

Feel free to submit a pull request with those changes. Either to this branch or to master.

@junghans
Copy link
Member

junghans commented Mar 4, 2020

Modules/Testing.cmake makes use of a cmake-3.11 feature, so we might want make that the minimum.

@akohlmey
Copy link
Member Author

akohlmey commented Mar 4, 2020

Modules/Testing.cmake makes use of a cmake-3.11 feature, so we might want make that the minimum.

No. #1723 has the reasoning why 3.10 was chosen. lammps-testing is still an ad hoc package and not something that we should encourage non-expert users to use. I think including it in the CMake configuration at this stage is not a good idea.

@akohlmey akohlmey merged commit d0160cc into lammps:master Mar 5, 2020
@akohlmey akohlmey deleted the cpp-11-cmake-3.10 branch March 5, 2020 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Update minimum CMake version required to 3.10 C++11 in LAMMPS
3 participants