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
This commit is contained in:
parent
b7b125d83c
commit
bdcae5f593
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue