Browse Source

default to debug configuration

Thomas Buck 10 years ago
parent
commit
e10e884d34
2 changed files with 18 additions and 6 deletions
  1. 14
    0
      CMakeLists.txt
  2. 4
    6
      README.md

+ 14
- 0
CMakeLists.txt View File

10
 # Build Host
10
 # Build Host
11
 set (OpenRaider_BUILD_HOST ${CMAKE_HOST_SYSTEM})
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
 # Configuration Header file
23
 # Configuration Header file
14
 configure_file (
24
 configure_file (
15
     "${PROJECT_SOURCE_DIR}/cmake/Config.h.in"
25
     "${PROJECT_SOURCE_DIR}/cmake/Config.h.in"
23
 # Include External Modules
33
 # Include External Modules
24
 set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
34
 set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
25
 
35
 
36
+#################################################################
37
+
26
 # Build warnings
38
 # Build warnings
27
 set (WARNINGS "${WARNINGS} -Weverything -Wno-padded -Wno-packed")
39
 set (WARNINGS "${WARNINGS} -Weverything -Wno-padded -Wno-packed")
28
 set (WARNINGS "${WARNINGS} -Wno-global-constructors -Wno-exit-time-destructors")
40
 set (WARNINGS "${WARNINGS} -Wno-global-constructors -Wno-exit-time-destructors")
46
 set (OpenRaider_CXX_FLAGS_RELEASE "${OpenRaider_CXX_FLAGS_RELEASE} -ffast-math -funroll-loops")
58
 set (OpenRaider_CXX_FLAGS_RELEASE "${OpenRaider_CXX_FLAGS_RELEASE} -ffast-math -funroll-loops")
47
 set (OpenRaider_CXX_FLAGS_RELEASE "${OpenRaider_CXX_FLAGS_RELEASE} -fomit-frame-pointer")
59
 set (OpenRaider_CXX_FLAGS_RELEASE "${OpenRaider_CXX_FLAGS_RELEASE} -fomit-frame-pointer")
48
 
60
 
61
+#################################################################
62
+
49
 # Add subdirectories
63
 # Add subdirectories
50
 add_subdirectory (src)
64
 add_subdirectory (src)
51
 add_subdirectory (test)
65
 add_subdirectory (test)

+ 4
- 6
README.md View File

54
 
54
 
55
 ## Building
55
 ## Building
56
 
56
 
57
-Do a standard cmake out-of-source build and then run the resulting executable:
57
+Do a standard cmake out-of-source build to get a debug configuration and then run the resulting executable:
58
 
58
 
59
-    mkdir build
60
-    cd build
61
-    cmake -DCMAKE_BUILD_TYPE=Debug ..
62
-    make
63
-    ./src/OpenRaider
59
+    mkdir build && cd build
60
+    cmake ..
61
+    make run
64
 
62
 
65
 On Mac OS X, running `make install` will produce a (more or less) distributable OpenRaider.app bundle.
63
 On Mac OS X, running `make install` will produce a (more or less) distributable OpenRaider.app bundle.
66
 
64
 

Loading…
Cancel
Save