Skip to content

Commit

Permalink
CMake: Release build by default
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesLorenz committed Sep 24, 2024
1 parent 8ba7f99 commit 1d0b39b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ option(WANT_EXPERIMENTAL "Enable experimental effects" OFF)
# Configuration
#

if(CMAKE_BUILD_TYPE STREQUAL "")
SET(CMAKE_BUILD_TYPE "Release")
endif()

SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})

find_package(PkgConfig REQUIRED)
Expand Down Expand Up @@ -230,7 +234,10 @@ message(
"-------\n"
"* Build product : ${PROJECT_NAME} ${VERSION}\n")
if(CMAKE_BUILD_TYPE)
message("* Build type : ${CMAKE_BUILD_TYPE}\n")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(BUILD_TYPE_HINT " (WARNING: VERY SLOW!)")
endif()
message("* Build type : ${CMAKE_BUILD_TYPE}${BUILD_TYPE_HINT}\n")
endif()
message(
"* Install Prefix : ${CMAKE_INSTALL_PREFIX}\n"
Expand Down

0 comments on commit 1d0b39b

Please sign in to comment.