Skip to content

Commit 3d15fb7

Browse files
codingwithmaggaCopilot
andcommitted
Activate C
Co-authored-by: Copilot <copilot@github.com>
1 parent 9429f65 commit 3d15fb7

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,18 @@ jobs:
4545
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
4646
-DCPUSCOPE_BUILD_TESTS=ON \
4747
-DCPUSCOPE_WERROR=ON \
48+
-DCMAKE_C_COMPILER=gcc-13 \
4849
-DCMAKE_CXX_COMPILER=g++-13 \
50+
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
4951
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
5052
else
5153
cmake -S . -B build -G Ninja \
5254
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
5355
-DCPUSCOPE_BUILD_TESTS=ON \
5456
-DCPUSCOPE_WERROR=ON \
57+
-DCMAKE_C_COMPILER=clang-17 \
5558
-DCMAKE_CXX_COMPILER=clang++-17 \
59+
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
5660
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
5761
fi
5862
@@ -101,8 +105,11 @@ jobs:
101105
-DCMAKE_BUILD_TYPE=Release \
102106
-DCPUSCOPE_BUILD_TESTS=ON \
103107
-DCPUSCOPE_WERROR=ON \
108+
-DCMAKE_C_COMPILER=clang-17 \
104109
-DCMAKE_CXX_COMPILER=clang++-17 \
110+
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
105111
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
112+
-DCMAKE_C_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize-recover=all" \
106113
-DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize-recover=all" \
107114
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined"
108115

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.25)
22

3-
project(cpuscope VERSION 0.1.0 LANGUAGES CXX)
3+
project(cpuscope VERSION 0.1.0 LANGUAGES C CXX)
44

55
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
66
message(FATAL_ERROR "In-source builds are not allowed. Please use a separate build directory.")

0 commit comments

Comments
 (0)