From f6a48f2672086001cd652252b2e3ded22c376513 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Wed, 20 Dec 2017 08:25:55 +0000 Subject: [PATCH] Fix use of cmake_minimum_required cmake_minimum_required() must be used before project(), otherwise it has no effect on internal cmake code that runs when project() is invoked. In particular CMP0025 does not default to NEW and CMake does not detect Clang features on Darwin, which is necessary to compile the project with the upstream (non Apple) compiler. --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b207b5e..a92f018f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,16 +14,16 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +cmake_minimum_required(VERSION 3.1.0) + +project(KeePassXC) + if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo Debug DebugFull Profile MinSizeRel." FORCE) endif() -project(KeePassXC) - -cmake_minimum_required(VERSION 3.1.0) - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) # Support Visual Studio Code