Prevent CMAKE_Fortran_COMPILER_VERSION from becoming undefined #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CMAKE_Fortran_COMPILER_VERSIONwas added to CACHE to prevent it from becoming unset after the second configuring. Previously, this variable was sometimes automatically unset which in turn affected variables such asopencoarrays_aware_compiler. I reported a bug about this so let's wait for a little while for the response.CMAKE_Fortran_COMPILER_VERSIONis present starting with CMake 3.3 and therefore I think it's better to write the conditional not as(CMAKE_VERSION VERSION_GREATER 3.2.3)but(NOT CMAKE_VERSION VERSION_LESS 3.3). Similarly, at line 45, if the intention is to test whether GCC is at least version 5, it would be better to have(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 5). In other places, I can see conditionals such as(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER 4.9.2)(note that 4.9.3 has been released). If you agree with me, then I'd like to replaceVERSION_GREATERwithNOT ... VERSION_LESSand make the necessary changes everywhere.