We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33fb270 commit 759347aCopy full SHA for 759347a
CMakeLists.txt
@@ -10,6 +10,12 @@ option(LIBSCRATCHCPP_BUILD_UNIT_TESTS "Build unit tests" ON)
10
option(LIBSCRATCHCPP_NETWORK_SUPPORT "Support for downloading projects" ON)
11
option(LIBSCRATCHCPP_PRINT_LLVM_IR "Print LLVM IR of compiled Scratch scripts (for debugging)" OFF)
12
13
+if (CMAKE_BUILD_TYPE MATCHES "Debug")
14
+ set(SANITIZER_FLAGS "-fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer")
15
+ set(CMAKE_CFLAGS ${CMAKE_CFLAGS} ${SANITIZER_FLAGS})
16
+ set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${SANITIZER_FLAGS})
17
+endif()
18
+
19
add_library(scratchcpp SHARED)
20
add_subdirectory(src)
21
include_directories(src) # TODO: Remove this line
0 commit comments