summaryrefslogtreecommitdiff
path: root/PlatformSettings.cmake
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2025-09-20 19:20:03 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2025-09-20 19:20:03 +0200
commitb45d74b60dfb7e23911df6b0523890e42f711267 (patch)
tree42bb5764b05bd3bc5bffadb55f4375e6dce8a521 /PlatformSettings.cmake
parent6c1a798b0302034a7fdcaf93b8f014e2e458c2a0 (diff)
parent63ec5715054be18ac4db5675e067b41c955d03b9 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'PlatformSettings.cmake')
-rw-r--r--PlatformSettings.cmake16
1 files changed, 10 insertions, 6 deletions
diff --git a/PlatformSettings.cmake b/PlatformSettings.cmake
index 272af37..a1b36a9 100644
--- a/PlatformSettings.cmake
+++ b/PlatformSettings.cmake
@@ -24,6 +24,7 @@ if(UNIX)
add_link_options("-pthread")
endif()
+ add_compile_options("-Wall")
# glib 2.0 deprecated GTypeDebugFlags and GTimeVal, gtk2 has not been updated
add_compile_options("-Wno-deprecated-declarations")
endif()
@@ -51,11 +52,14 @@ if(WIN32)
set( XTRKCAD_ARCH_SUBDIR "x86")
endif ()
- set(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1" CACHE STRING "Flags used by the compiler during debug builds" FORCE)
- set(CMAKE_C_FLAGS_MINSIZEREL "/MD /O1 /Ob1 /D NDEBUG" CACHE STRING "Flags used by the compiler during release minumum size builds" FORCE)
- set(CMAKE_C_FLAGS_RELEASE "/MD /O2 /Ob2 /D NDEBUG" CACHE STRING "Flags used by the compiler during release builds" FORCE)
- set(CMAKE_C_FLAGS_RELWITHDEBINFO "/MDd /Zi /O2 /Ob1 /D NDEBUG" CACHE STRING "Flags used by the compiler during release with debug info builds" FORCE)
+ add_compile_options(
+ "$<$<CONFIG:DEBUG>:/W3>"
+ )
- add_definitions(-DWINDOWS)
- add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+ add_compile_definitions(
+ "$<$<CONFIG:DEBUG>:_DEBUG>"
+ )
+
+ add_compile_definitions(WINDOWS)
+ add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
endif()