Skip to content

Commit

Permalink
COMP: Fix CMake 3.26 warning in ctkLinkerAsNeededFlagCheck project
Browse files Browse the repository at this point in the history
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.
```
  • Loading branch information
jcfr committed Oct 25, 2023
1 parent b76c386 commit c57612f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CMake/ctkLinkerAsNeededFlagCheck/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(ctkLinkerAsNeededFlagCheck)
add_library(A SHARED A.cpp)
add_library(B SHARED B.cpp)
Expand Down

0 comments on commit c57612f

Please sign in to comment.