Skip to content

Commit 0fcd61a

Browse files
authored
Merge pull request #25 from sir-gon/develop
[CONFIG] [Github Actions] C/C++ for windows.
2 parents 950040c + 368a7ad commit 0fcd61a

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

.github/workflows/c-windows.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,9 @@ jobs:
7575
7676
- name: Test
7777
run: >
78-
ctest --test-dir ${{ github.workspace }}/build/default
78+
ctest
79+
-C Debug
80+
-T test
81+
--rerun-failed
82+
--output-on-failure
83+
--test-dir ${{ github.workspace }}/build/default

CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ set(CMAKE_CXX_STANDARD 17)
1616
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1717
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
1818

19-
SET(GCC_COVERAGE_COMPILE_FLAGS "-fsanitize=address -fprofile-arcs -ftest-coverage -g -O0")
19+
SET(GCC_COVERAGE_COMPILE_FLAGS "-fsanitize=address -fprofile-arcs -ftest-coverage -g -O0 -save-temps")
2020
SET(GCC_COVERAGE_LINK_FLAGS "--coverage")
2121

2222
if (CMAKE_GENERATOR MATCHES "Unix Makefiles")
2323

24-
SET(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
25-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
26-
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
24+
SET(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
25+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
26+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
27+
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
2728

2829
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
2930

src/lib/exercises/CMakeLists.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
file (GLOB_RECURSE SOURCES "src/*.c")
1+
file (GLOB_RECURSE SOURCES "src/*.c" "src/*.cpp")
22
add_library(exercises STATIC ${SOURCES})
33

44
target_include_directories(exercises
@@ -7,13 +7,6 @@ target_include_directories(exercises
77
$<INSTALL_INTERFACE:include>
88
)
99

10-
set_property(TARGET exercises PROPERTY C_STANDARD 11)
11-
12-
target_compile_options(exercises
13-
PUBLIC
14-
-save-temps
15-
)
16-
1710
install(TARGETS exercises
1811
EXPORT exercisesConfig
1912
ARCHIVE DESTINATION lib

0 commit comments

Comments
 (0)