File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1919 submodules : true
2020
2121 - name : Configure CMake
22- run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLIBSCRATCHCPP_BUILD_UNIT_TESTS=ON -DLIBSCRATCHCPP_AUDIO_SUPPORT=OFF -DLIBSCRATCHCPP_NETWORK_SUPPORT=OFF
22+ run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLIBSCRATCHCPP_BUILD_UNIT_TESTS=ON -DLIBSCRATCHCPP_ENABLE_SANITIZER=ON - DLIBSCRATCHCPP_AUDIO_SUPPORT=OFF -DLIBSCRATCHCPP_NETWORK_SUPPORT=OFF
2323
2424 - name : Build
2525 run : cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j$(nproc --all)
Original file line number Diff line number Diff line change 2424 sudo apt-get install -y nlohmann-json3-dev libutfcpp-dev
2525 shell : bash
2626 - name : Configure CMake
27- run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLIBSCRATCHCPP_BUILD_UNIT_TESTS=ON
27+ run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLIBSCRATCHCPP_BUILD_UNIT_TESTS=ON -DLIBSCRATCHCPP_ENABLE_SANITIZER=ON
2828
2929 - name : Build
3030 run : cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j$(nproc --all)
Original file line number Diff line number Diff line change @@ -9,8 +9,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
99option (LIBSCRATCHCPP_BUILD_UNIT_TESTS "Build unit tests" ON )
1010option (LIBSCRATCHCPP_NETWORK_SUPPORT "Support for downloading projects" ON )
1111option (LIBSCRATCHCPP_PRINT_LLVM_IR "Print LLVM IR of compiled Scratch scripts (for debugging)" OFF )
12+ option (LIBSCRATCHCPP_ENABLE_SANITIZER "Enable sanitizer to detect memory issues" OFF )
1213
13- if (CMAKE_BUILD_TYPE MATCHES "Debug" )
14+ if (LIBSCRATCHCPP_ENABLE_SANITIZER )
1415 set (SANITIZER_FLAGS "-fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer" )
1516 set (CMAKE_CFLAGS ${CMAKE_CFLAGS} ${SANITIZER_FLAGS} )
1617 set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${SANITIZER_FLAGS} )
You can’t perform that action at this time.
0 commit comments