Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2019-01-29 11:57:17 +0300
committerbubnikv <bubnikv@gmail.com>2019-01-29 11:57:17 +0300
commitc4bc45cff4951435502144ee5cd630dff4ea113a (patch)
tree0223d5ac351a28496a3a51b3f9461c28e9e86434 /CMakeLists.txt
parent46709c92cd023f3860350b8242617bc794d743a9 (diff)
Add DEBUG and _DEBUG symbols on OSX & Linux in a way the Visual Studio
does that.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c4e599f36..4e42e24e9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,6 +85,12 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
+if(NOT WIN32)
+ # Add DEBUG flags for the debug builds in a way the Visual Studio adds these flags.
+ add_compile_options("$<$<CONFIG:DEBUG>:-DDEBUG>")
+ add_compile_options("$<$<CONFIG:DEBUG>:-D_DEBUG>")
+endif()
+
# To be able to link libslic3r with the Perl XS module.
# Once we get rid of Perl and libslic3r is linked statically, we can get rid of -fPIC
set(CMAKE_POSITION_INDEPENDENT_CODE ON)