Call project()
before before enable_language()
in CmakeLists.txt …
#2125
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.
This change fixes the warning appearing when calling
configure_new
with newer versions of Cmake.TYPE: bug fix
KEYWORDS: cmake, configure
SOURCE: Jakub Lewandowski (University of Leeds)
DESCRIPTION OF CHANGES:
Problem:
When calling
configure_new
script with newer versions of Cmake (3.30.5 in my case) warning appears:Solution:
This is easily fixable by calling
project()
beforeenable_language()
as the warning suggests.ISSUE: For use when this PR closes an issue.
n/a
LIST OF MODIFIED FILES: CmakeLists.txt
TESTS CONDUCTED:
I tested the change on my machine and it solved the issue. As the change is very minor it should not cause issues for others.
RELEASE NOTE: Fixed CMake dev warning
project() should be called prior to this enable_language() call
appearing when usingconfigure_new
script with some newer versions of Cmake.