diff options
author | Vollstrecker <werner@vollstreckernet.de> | 2024-12-03 13:44:06 +0100 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2025-01-31 19:59:10 -0800 |
commit | e37a1a8345420989d20f555102d5bef4cb116b86 (patch) | |
tree | 3289a256c3f81da7894408abf90fb52b32d65296 | |
parent | f7ab6e43732bc68b38ef5db5feda27105d954b5b (diff) | |
download | zlib-e37a1a8345420989d20f555102d5bef4cb116b86.tar.gz zlib-e37a1a8345420989d20f555102d5bef4cb116b86.tar.bz2 zlib-e37a1a8345420989d20f555102d5bef4cb116b86.zip |
CMake: Warn if no build-type is selected.
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7900962..b20a7ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | cmake_minimum_required(VERSION 3.5) | 1 | cmake_minimum_required(VERSION 3.9) |
2 | 2 | ||
3 | project(zlib | 3 | project(zlib |
4 | LANGUAGES C | 4 | LANGUAGES C |
@@ -13,6 +13,13 @@ if(WIN32) | |||
13 | option(ZLIB_INSTALL_COMPAT_DLL "Install a copy as zlib1.dll" ON) | 13 | option(ZLIB_INSTALL_COMPAT_DLL "Install a copy as zlib1.dll" ON) |
14 | endif(WIN32) | 14 | endif(WIN32) |
15 | 15 | ||
16 | get_property(IS_MULTI GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) | ||
17 | |||
18 | if(NOT DEFINED CMAKE_BUILD_TYPE AND NOT IS_MULTI) | ||
19 | message(STATUS "No CMAKE_BUILD_TYPE set -- using Release") | ||
20 | set(CMAKE_BUILD_TYPE Release) | ||
21 | endif(NOT DEFINED CMAKE_BUILD_TYPE AND NOT IS_MULTI) | ||
22 | |||
16 | include(CheckTypeSize) | 23 | include(CheckTypeSize) |
17 | include(CheckFunctionExists) | 24 | include(CheckFunctionExists) |
18 | include(CheckIncludeFile) | 25 | include(CheckIncludeFile) |