File tree 3 files changed +12
-7
lines changed
3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 19
19
uses : actions/checkout@v2
20
20
- name : Build
21
21
run : |
22
- cd test
23
- make
22
+ mkdir build
23
+ cd build
24
+ cmake ..
25
+ cmake --build .
Original file line number Diff line number Diff line change 1
- cmake_minimum_required (VERSION 3.25.0 )
1
+ cmake_minimum_required (VERSION 3.16..3.29 )
2
2
3
3
project (clar LANGUAGES C)
4
4
@@ -20,6 +20,9 @@ set_target_properties(clar PROPERTIES
20
20
C_EXTENSIONS OFF
21
21
)
22
22
23
- if (BUILD_TESTS)
24
- add_subdirectory (test )
23
+ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME )
24
+ include (CTest)
25
+ if (BUILD_TESTING)
26
+ add_subdirectory (test )
27
+ endif ()
25
28
endif ()
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ find_package(Python COMPONENTS Interpreter REQUIRED)
2
2
3
3
add_custom_command (OUTPUT "${CMAKE_CURRENT_BINARY_DIR} /clar.suite"
4
4
COMMAND "${Python_EXECUTABLE} " "${CMAKE_SOURCE_DIR} /generate.py" --output "${CMAKE_CURRENT_BINARY_DIR} "
5
- DEPENDS main.c sample.c
5
+ DEPENDS main.c sample.c clar_test.h
6
6
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} "
7
7
)
8
8
@@ -15,7 +15,7 @@ set_target_properties(clar_test PROPERTIES
15
15
16
16
# MSVC generates all kinds of warnings. We may want to fix these in the future
17
17
# and then unconditionally treat warnings as errors.
18
- if (NOT MSVC )
18
+ if (NOT MSVC )
19
19
set_target_properties (clar_test PROPERTIES
20
20
COMPILE_WARNING_AS_ERROR ON
21
21
)
You can’t perform that action at this time.
0 commit comments