File tree 1 file changed +11
-9
lines changed
1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -46,22 +46,24 @@ jobs:
46
46
- name : Check Installed Headers Compile Cleanly
47
47
run : |
48
48
mkdir -p header-check
49
- cd header-check
50
- cmake -S . -B build -DCMAKE_C_STANDARD=99 -DPM_INCLUDE_DIR="${{ github.workspace }}/install/include" <<EOF
49
+ cat <<EOF > header-check/CMakeLists.txt
51
50
cmake_minimum_required(VERSION 3.15)
52
51
project(HeaderCheck C)
53
52
54
- file(GLOB PUBLIC_HEADERS "\${PM_INCLUDE_DIR}/*.h")
53
+ set(PROJECTM_INCLUDE_DIR "${{ github.workspace }}/install/include")
54
+ file(GLOB PUBLIC_HEADERS "\${PROJECTM_INCLUDE_DIR}/*.h")
55
55
56
56
foreach(header IN LISTS PUBLIC_HEADERS)
57
- get_filename_component(header_file "\${header}" NAME)
58
- set(test_source "\${CMAKE_BINARY_DIR}/check_\${header_file}.c")
59
- file(WRITE "\${test_source}" "#include <\${header_file}>\nint main(void) { return 0; }\n")
60
- add_executable("check_\${header_file}" "\${test_source}")
61
- target_include_directories("check_\${header_file}" PRIVATE "\${PM_INCLUDE_DIR }")
57
+ get_filename_component(header_file "\${header}" NAME)
58
+ set(test_source "\${CMAKE_BINARY_DIR}/check_\${header_file}.c")
59
+ file(WRITE "\${test_source}" "#include <\${header_file}>\nint main(void) { return 0; }\n")
60
+ add_executable("check_\${header_file}" "\${test_source}")
61
+ target_include_directories("check_\${header_file}" PRIVATE "\${PROJECTM_INCLUDE_DIR }")
62
62
endforeach()
63
63
EOF
64
- cmake --build build --parallel
64
+
65
+ cmake -S header-check -B header-check/build -DCMAKE_C_STANDARD=99
66
+ cmake --build header-check/build --parallel
65
67
66
68
- name : Upload Artifact
67
69
uses : actions/upload-artifact@v4
You can’t perform that action at this time.
0 commit comments