Browse Source

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
pull/13/head
Damian Wrobel 7 years ago
committed by Wayne Stambaugh
parent
commit
f85b1479aa
  1. 4
      CMakeLists.txt

4
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.

Loading…
Cancel
Save