aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/cmake/flags.cmake
diff options
context:
space:
mode:
authorspicyjpeg <thatspicyjpeg@gmail.com>2022-12-18 16:19:31 +0100
committerspicyjpeg <thatspicyjpeg@gmail.com>2022-12-18 16:19:31 +0100
commita3359c0e7d85bf4752cda3b00892ecd5ef691077 (patch)
tree5888e4a77b207f24ccd9ad148d1c74e9c33400e9 /libpsn00b/cmake/flags.cmake
parentb58a37bdac753ceace35761ef474c198a3f18e12 (diff)
downloadpsn00bsdk-a3359c0e7d85bf4752cda3b00892ecd5ef691077.tar.gz
Bump to v0.22, update CMake scripts and docs
Diffstat (limited to 'libpsn00b/cmake/flags.cmake')
-rw-r--r--libpsn00b/cmake/flags.cmake16
1 files changed, 13 insertions, 3 deletions
diff --git a/libpsn00b/cmake/flags.cmake b/libpsn00b/cmake/flags.cmake
index 1ca25c2..fdc479e 100644
--- a/libpsn00b/cmake/flags.cmake
+++ b/libpsn00b/cmake/flags.cmake
@@ -14,7 +14,6 @@ target_compile_options(
# Options common to all target types
-g
-Wa,--strip-local-absolute
- -O2
-ffreestanding
-fno-builtin
-nostdlib
@@ -29,7 +28,6 @@ target_compile_options(
-mabi=32
-mno-mt
-mno-llsc
- -mdivide-breaks
$<$<COMPILE_LANGUAGE:CXX>:
# Options common to all target types (C++)
-fno-exceptions
@@ -38,6 +36,14 @@ target_compile_options(
-fno-threadsafe-statics
-fno-use-cxa-atexit
>
+ $<IF:$<CONFIG:Debug>,
+ # Options for debug builds
+ -Og
+ -mdivide-breaks
+ ,
+ # Options for release builds
+ -O2
+ >
$<$<STREQUAL:$<UPPER_CASE:$<TARGET_PROPERTY:PSN00BSDK_TARGET_TYPE>>,EXECUTABLE_GPREL>:
# Options for executables with $gp-relative addressing
-G8
@@ -86,5 +92,9 @@ target_link_options(
target_compile_definitions(
psn00bsdk INTERFACE
PSN00BSDK=1
- $<$<CONFIG:Release>:NDEBUG=1>
+ $<IF:$<CONFIG:Debug>,
+ #NDEBUG=0
+ ,
+ NDEBUG=1
+ >
)