Commit 9d52e7fe by Nicolas Capens

Set the CMake default build type to Release.

CMake considers built-in configuration variables to be predefined, thus setting CMAKE_BUILD_TYPE with a default value doesn't work because it already exists. The FORCE attribute overrides it, but we have to guard against overriding user-specified values. Change-Id: Icf1cad6af15e788c5ae9ac8424f1ef0d29f9a1ff Reviewed-on: https://swiftshader-review.googlesource.com/8377Tested-by: 's avatarNicolas Capens <capn@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 930b700a
...@@ -2,7 +2,10 @@ cmake_minimum_required(VERSION 2.8) ...@@ -2,7 +2,10 @@ cmake_minimum_required(VERSION 2.8)
project(SwiftShader C CXX) project(SwiftShader C CXX)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build: Debug Release RelWithDebInfo." ) if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build: Debug Release MinSizeRel RelWithDebInfo." FORCE)
endif()
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release MinSizeRel RelWithDebInfo)
option(BUILD_EGL "Build the EGL library" 1) option(BUILD_EGL "Build the EGL library" 1)
if(WIN32) if(WIN32)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment