|
@@ -10,6 +10,16 @@ set (OpenRaider_VERSION_RELEASE -git)
|
10
|
10
|
# Build Host
|
11
|
11
|
set (OpenRaider_BUILD_HOST ${CMAKE_HOST_SYSTEM})
|
12
|
12
|
|
|
13
|
+#################################################################
|
|
14
|
+
|
|
15
|
+# Set a default build type if none was specified
|
|
16
|
+if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
|
17
|
+ message(STATUS "Setting build type to 'Debug' as none was specified.")
|
|
18
|
+ set(CMAKE_BUILD_TYPE Debug)
|
|
19
|
+endif()
|
|
20
|
+
|
|
21
|
+#################################################################
|
|
22
|
+
|
13
|
23
|
# Configuration Header file
|
14
|
24
|
configure_file (
|
15
|
25
|
"${PROJECT_SOURCE_DIR}/cmake/Config.h.in"
|
|
@@ -23,6 +33,8 @@ include_directories ("${PROJECT_BINARY_DIR}")
|
23
|
33
|
# Include External Modules
|
24
|
34
|
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
|
25
|
35
|
|
|
36
|
+#################################################################
|
|
37
|
+
|
26
|
38
|
# Build warnings
|
27
|
39
|
set (WARNINGS "${WARNINGS} -Weverything -Wno-padded -Wno-packed")
|
28
|
40
|
set (WARNINGS "${WARNINGS} -Wno-global-constructors -Wno-exit-time-destructors")
|
|
@@ -46,6 +58,8 @@ set (OpenRaider_CXX_FLAGS_RELEASE "${OpenRaider_CXX_FLAGS_RELEASE} -DNDEBUG -O2"
|
46
|
58
|
set (OpenRaider_CXX_FLAGS_RELEASE "${OpenRaider_CXX_FLAGS_RELEASE} -ffast-math -funroll-loops")
|
47
|
59
|
set (OpenRaider_CXX_FLAGS_RELEASE "${OpenRaider_CXX_FLAGS_RELEASE} -fomit-frame-pointer")
|
48
|
60
|
|
|
61
|
+#################################################################
|
|
62
|
+
|
49
|
63
|
# Add subdirectories
|
50
|
64
|
add_subdirectory (src)
|
51
|
65
|
add_subdirectory (test)
|