aboutsummaryrefslogtreecommitdiff
path: root/ricochet/etc/build_type.cmake
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-10-30 02:24:12 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-10-30 02:24:12 +0800
commit464313d02b76385d3a2e8809a4595afabca88dae (patch)
tree6cbf81416b856ff15fdc4239de5e3624ef10b2cc /ricochet/etc/build_type.cmake
parentcf58b3b4dfa0dbbd0ca492484ca241b320c4ba9e (diff)
parentbdefdb301db843e87aee8c6c35808d295bb66ee5 (diff)
downloadrcc-project-master.tar.gz
rcc-project-master.tar.xz
Merge remote-tracking branch 'ricochet-import/master'HEADmaster
Diffstat (limited to 'ricochet/etc/build_type.cmake')
-rw-r--r--ricochet/etc/build_type.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/ricochet/etc/build_type.cmake b/ricochet/etc/build_type.cmake
new file mode 100644
index 0000000..69d019f
--- /dev/null
+++ b/ricochet/etc/build_type.cmake
@@ -0,0 +1,11 @@
+set(default_build_type "Debug")
+
+if (NOT (CMAKE_BUILD_TYPE_SHADOW STREQUAL CMAKE_BUILD_TYPE))
+ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+ message (STATUS "Setting build type to '${default_build_type}'")
+ set (CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE)
+ endif ()
+ set (CMAKE_BUILD_TYPE_SHADOW ${CMAKE_BUILD_TYPE} CACHE STRING "used to detect changes in build type" FORCE)
+endif ()
+
+message (STATUS "Building in '${CMAKE_BUILD_TYPE}' mode.")