From fe8be2c33847e557292150ab38b79213172c4860 Mon Sep 17 00:00:00 2001 From: Dianjin Wang Date: Fri, 31 Oct 2025 15:52:23 +0800 Subject: [PATCH] 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. ``` --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 066345615..4b4aad0f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,10 @@ # MADlib CMake Build Script # ------------------------------------------------------------------------------ +# FindPostgreSQL.cmake needs at least 2.8.3. We are on the safe side and require +# the minimum version tested, which is 2.8.4. +cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR) + # -- Initializations that need to run even before project() # For Solaris, we want to use the Sun compiler @@ -13,10 +17,6 @@ set(CMAKE_GENERATOR_CXX sunCC g++) project(MADlib) -# FindPostgreSQL.cmake needs at least 2.8.3. We are on the safe side and require -# the minimum version tested, which is 2.8.4. -cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR) - include(ExternalProject) include(CheckCXXCompilerFlag)