From f85b1479aa435c55afd8d4b7a448d25fd54f2998 Mon Sep 17 00:00:00 2001 From: Damian Wrobel Date: Sun, 19 Aug 2018 18:41:06 +0200 Subject: [PATCH] Fix setting default cmake build type Changes: Sets default cmake build type before calling project(). Current version seems to follow https://cmake.org/pipermail/cmake/2008-September/023808.html however, it seems to miss the comment that: "definition of CMAKE_BUILD_TYPE occurs in the PROJECT() command" which means that setting cmake build type should happend prior to calling PROJECT(). Fixes: lp:1785719 * https://bugs.launchpad.net/kicad/+bug/1785719 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd32871d62..903835f240 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,8 +30,6 @@ if(POLICY CMP0025) cmake_policy(SET CMP0025 NEW) # CMake 3.0 endif() -project( kicad ) - # Default to CMAKE_BUILD_TYPE = Release unless overridden on command line # http://www.cmake.org/pipermail/cmake/2008-September/023808.html if( DEFINED CMAKE_BUILD_TYPE ) @@ -40,6 +38,8 @@ else() set( CMAKE_BUILD_TYPE Release CACHE STRING "Set to either \"Release\" or \"Debug\"" ) endif() +project( kicad ) + include( GNUInstallDirs ) # Path to local CMake modules.