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

COMP: Fix CMake 3.26 warning in ctkLinkerAsNeededFlagCheck project #1149

Merged

Conversation

jcfr
Copy link
Member

@jcfr jcfr commented Oct 25, 2023

Starting with CMake 2.26, a warning is reported if "cmake_minimum_required()" is not called before the "project()" command.

See https://cmake.org/cmake/help/v3.26/release/3.26.html#other-changes

It fixes the following warning:

CMake Warning (dev) at /path/to/CTK/CMake/ctkLinkerAsNeededFlagCheck/CMakeLists.txt:1 (project):
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

Adapted from Slicer/Slicer@968fd24 introduced through:

Starting with CMake 2.26, a warning is reported if "cmake_minimum_required()"
is not called before the "project()" command.

See https://cmake.org/cmake/help/v3.26/release/3.26.html#other-changes

It fixes the following warning:

```
CMake Warning (dev) at /path/to/CTK/CMake/ctkLinkerAsNeededFlagCheck/CMakeLists.txt:1 (project):
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.
```
@jcfr jcfr enabled auto-merge (rebase) October 25, 2023 19:33
@jcfr jcfr merged commit c57612f into commontk:master Oct 25, 2023
2 checks passed
@jcfr jcfr deleted the fix-ctkLinkerAsNeededFlagCheck-cmake-warning branch October 25, 2023 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant