diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 57340d9..bd62409 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -57,6 +57,12 @@ jobs: - name: Configure CMake run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCODE_COVERAGE=${{ matrix.coverage }} -DTEST_WITH_CXX23=${{ matrix.test_with_cxx23 }} + - name: Upload compile_commands.json + uses: actions/upload-artifact@v3 + with: + name: compile_commands.json + path: compile_commands.json + - name: Build run: cmake --build ${{github.workspace}}/build --parallel --config ${{env.BUILD_TYPE}} diff --git a/CMakeLists.txt b/CMakeLists.txt index 213dc4b..b67fff6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,8 @@ if(TOP_LEVEL_PROJECT) list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/contrib) if(CXX_COMPILER_ID MATCHES "Clang") - target_compile_options(Catch2 PRIVATE -stdlib=libc++) + target_compile_options(Catch2::Catch2 PUBLIC -stdlib=libc++) + target_compile_options(Catch2::Catch2WithMain PUBLIC -stdlib=libc++) endif() set(CMAKE_EXPORT_COMPILE_COMMANDS ON)