Skip to content
This repository was archived by the owner on Sep 27, 2024. It is now read-only.

Commit c30271a

Browse files
authored
Merge pull request #194 from OpenSCAP/cmake_release
Set CMAKE_BUILD_TYPE
2 parents cdbcf45 + 7025722 commit c30271a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
cmake_minimum_required(VERSION 2.8.6)
22

3+
# Inspired and referenced from https://blog.kitware.com/cmake-and-the-default-build-type
4+
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
5+
message(STATUS "Setting build type to 'Release' as none was specified.")
6+
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
7+
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
8+
"MinSizeRel" "RelWithDebInfo")
9+
endif()
10+
311
project("scap-workbench")
412
set(SCAP_WORKBENCH_VERSION_MAJOR "1")
513
set(SCAP_WORKBENCH_VERSION_MINOR "2")

0 commit comments

Comments
 (0)