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 39285b9Copy full SHA for 39285b9
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(ASAN_FLAGS "-fsanitize=undefined -fsanitize=address -fsanitize=memory")
15
+ set(CMAKE_CFLAGS ${CMAKE_CFLAGS} ${ASAN_FLAGS})
16
+ set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${ASAN_FLAGS})
17
+endif()
18
+
19
add_library(scratchcpp SHARED)
20
add_subdirectory(src)
21
include_directories(src) # TODO: Remove this line
0 commit comments