diff options
author | Vitaly Chikunov <vt@altlinux.org> | 2021-12-15 03:46:26 +0300 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@users.noreply.github.com> | 2021-12-15 17:11:18 +0300 |
commit | b85ad0f1bf5be3684c2243e0c1fc09464f244b26 (patch) | |
tree | abca3262a0a65b9fd042e3088273a4616611a6bb /CMakeLists.txt | |
parent | 1c34b3491fd1a83fa29f5d28d67cca62ef965d40 (diff) | |
download | gost-engine-b85ad0f1bf5be3684c2243e0c1fc09464f244b26.zip gost-engine-b85ad0f1bf5be3684c2243e0c1fc09464f244b26.tar.gz gost-engine-b85ad0f1bf5be3684c2243e0c1fc09464f244b26.tar.bz2 |
CMake: Set default build type to RelWithDebInfo
To maintain backward compatibility for users already familiar with older engine
build type (basically restores `-O2 -g').
Fixes: 5ad6c77 ("Adapt C flags for the cmake build type")
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c314691..8461be8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,11 @@ enable_testing() find_package(OpenSSL 3.0 REQUIRED) +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.") + set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build." FORCE) +endif() + if (NOT DEFINED OPENSSL_ROOT_DIR) get_filename_component(OPENSSL_ROOT_DIR ${OPENSSL_INCLUDE_DIR} DIRECTORY) message(STATUS "Setting OpenSSL root: ${OPENSSL_ROOT_DIR}") |