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
CMake: Modernize DEAL_II_PACKAGE_HANDLE macro and clean up Find*.cmake files #13325
Conversation
I have manually verified that this still produces the same |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMake is beautiful. I am not sure I understood everything, but it looks reasonable.
@@ -33,14 +33,14 @@ | |||
MESSAGE(STATUS "This is CMake ${CMAKE_VERSION}") | |||
MESSAGE(STATUS "") | |||
|
|||
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0) | |||
CMAKE_MINIMUM_REQUIRED(VERSION 3.3.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we currently require 3.1 according to https://www.dealii.org/developer/readme.html
Do you need 3.3? If yes then we need to adjust.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I chose to simply bump to 3.3.0. It will make some cleanup of the CMake code I plan to do easier - and version 3.3.0 is reasonably ancient (Ubuntu 16.04 LTS already shipped 3.5.0). I have adjusted the readme and the rest of the documentation to state 3.3.0
.
AND "${_suffix}" STREQUAL "LIBRARIES") | ||
LIST(APPEND _temp_${_suffix} ${_arg}) | ||
|
||
ELSEIF("${_arg}" STREQUAL "CLEAR") # FIXME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to finish refactoring. The variable _fill_clear
is now gone and the FIXME
s have been removed.
* simplify logic by removing unnecessary booleans * use temporary variables to accumulate lists/string and override canonical names at end
- address FIXMEs - address reviews
@tjhei Thanks for the thorough read! I hope I have addressed all review comments. I checked that my latest changes still produce the same |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Would you mind writing a changelog entry for the cmake version change?
@tjhei Done! |
This pull request changes the
DEAL_II_PACKAGE_HANDLE
macro:This allows to use "canonical" names such as "FEATURE_LIBRARIES" already in
the call to
DEAL_II_PACKAGE_HANDLE
by clearing these variables at the endand not at the beginning of the
DEAL_II_PACKAGE_HANDLE
macro.This also raises the required minimal CMake version to 3.3.0 which was released 7 years ago.