From 82e5b184e4586a3e1be9097872239c5fb2ef882f Mon Sep 17 00:00:00 2001 From: Andrew Kravchuk Date: Sat, 26 Aug 2017 00:03:50 +0300 Subject: [PATCH 1/2] Fixed CMAKE_BUILD_TYPE default value --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66f2801..d6b23ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,12 @@ PROJECT(miniz) cmake_minimum_required(VERSION 2.8) -set(CMAKE_BUILD_TYPE Release) -set(CMAKE_CONFIGURATION_TYPES Release Debug) +if(CMAKE_BUILD_TYPE STREQUAL "") + # CMake defaults to leaving CMAKE_BUILD_TYPE empty. This screws up + # differentiation between debug and release builds. + set(CMAKE_BUILD_TYPE "Release" CACHE STRING + "Choose the type of build, options are: None (CMAKE_CXX_FLAGS or \ +CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE) +endif () set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) From 9393a95f26f7970a730a3d125feb0e4881a574ab Mon Sep 17 00:00:00 2001 From: Andrew Kravchuk Date: Sat, 26 Aug 2017 03:47:07 +0300 Subject: [PATCH 2/2] Removed need in C++ compiler in cmake build --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d6b23ba..ea27b01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -PROJECT(miniz) +PROJECT(miniz C) cmake_minimum_required(VERSION 2.8) if(CMAKE_BUILD_TYPE STREQUAL "") # CMake defaults to leaving CMAKE_BUILD_TYPE empty. This screws up