File tree Expand file tree Collapse file tree 7 files changed +176
-84
lines changed
Expand file tree Collapse file tree 7 files changed +176
-84
lines changed Original file line number Diff line number Diff line change 2525 env :
2626 ASAN_OPTIONS : check_initialization_order=1:strict_init_order=1:detect_stack_use_after_return=1:detect_leaks=1:detect_invalid_pointer_pairs=2
2727 UBSAN_OPTIONS : print_stacktrace=1:print_summary=1
28-
28+
2929 defaults :
3030 run :
3131 working-directory : ${{ github.workspace }}/build
@@ -41,13 +41,15 @@ jobs:
4141 run : apt update && apt install --allow-downgrades -y git cmake ${{ matrix.compiler.pkgs }}
4242
4343 - name : setup-catch
44- run : bash ./install_catch.sh -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }}
44+ env :
45+ CXX : ${{ matrix.compiler.cxx }}
46+ run : bash ../tools/install_catch.sh Release
4547
4648 - name : setup-build
47- run : cmake .. -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} -DCMAKE_CXX_FLAGS="-fsanitize=${{ matrix.sanitizer }} -g -fno-omit-frame-pointer"
49+ run : cmake .. -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} -DCMAKE_BUILD_TYPE=Release - DCMAKE_CXX_FLAGS="-fsanitize=${{ matrix.sanitizer }} -g -fno-omit-frame-pointer" -DSMP_BUILD_BENCHMARKS=OFF
4850
4951 - name : build
5052 run : cmake --build .
51-
53+
5254 - name : run-tests
53- run : ctest --output-on-failure --schedule-random
55+ run : ctest --output-on-failure --schedule-random
Original file line number Diff line number Diff line change 55.vs /
66* .hint
77
8- # Build results
9- out /
10- build /*
11- ! build /* .sh
12- * .exe
13-
148.cache /
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ project(small_unique_ptr VERSION 0.1 LANGUAGES CXX)
55include (GNUInstallDirs )
66include (CMakePackageConfigHelpers )
77
8+ option (SMP_BUILD_BENCHMARKS "Build the benchmarks for the library when ON." ON )
9+
810set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} /build" )
911set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
1012
@@ -47,6 +49,11 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/smp-config-version.cmake"
4749
4850include (CTest )
4951
50- enable_testing ()
51- add_subdirectory ("${CMAKE_CURRENT_SOURCE_DIR} /test" )
52- add_subdirectory ("${CMAKE_CURRENT_SOURCE_DIR} /benchmark" )
52+ if (BUILD_TESTING)
53+ enable_testing ()
54+ add_subdirectory ("${CMAKE_CURRENT_SOURCE_DIR} /test" )
55+ endif ()
56+
57+ if (SMP_BUILD_BENCHMARKS)
58+ add_subdirectory ("${CMAKE_CURRENT_SOURCE_DIR} /benchmark" )
59+ endif ()
Original file line number Diff line number Diff line change 1+ *
2+ ! .gitignore
You can’t perform that action at this time.
0 commit comments