From b0e0787be4ea3c54cad0aab58289b13d704fa460 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Wed, 25 Oct 2023 15:32:17 -0400 Subject: [PATCH] COMP: Fix CMake 3.26 warning in ctkLinkerAsNeededFlagCheck project 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. ``` --- CMake/ctkLinkerAsNeededFlagCheck/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMake/ctkLinkerAsNeededFlagCheck/CMakeLists.txt b/CMake/ctkLinkerAsNeededFlagCheck/CMakeLists.txt index 0191c1cb4b..c9666ad328 100644 --- a/CMake/ctkLinkerAsNeededFlagCheck/CMakeLists.txt +++ b/CMake/ctkLinkerAsNeededFlagCheck/CMakeLists.txt @@ -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)