Skip to content

Commit fe8be2c

Browse files
committed
Fix CMake warning by reordering commands
Moved cmake_minimum_required() before project() in CMakeLists.txt to resolve the CMake dev warning. This follows CMake best practices where cmake_minimum_required() should be called before project(). Reference: Warn when running `cmake ..`: ``` [gpadmin@cdw build]$ cmake .. CMake Warning (dev) at CMakeLists.txt:14 (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. ```
1 parent d03af81 commit fe8be2c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
# MADlib CMake Build Script
33
# ------------------------------------------------------------------------------
44

5+
# FindPostgreSQL.cmake needs at least 2.8.3. We are on the safe side and require
6+
# the minimum version tested, which is 2.8.4.
7+
cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
8+
59
# -- Initializations that need to run even before project()
610

711
# For Solaris, we want to use the Sun compiler
@@ -13,10 +17,6 @@ set(CMAKE_GENERATOR_CXX sunCC g++)
1317

1418
project(MADlib)
1519

16-
# FindPostgreSQL.cmake needs at least 2.8.3. We are on the safe side and require
17-
# the minimum version tested, which is 2.8.4.
18-
cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
19-
2020
include(ExternalProject)
2121
include(CheckCXXCompilerFlag)
2222

0 commit comments

Comments
 (0)