File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.12.1)
22
33project (wasi-libc
44 LANGUAGES C)
5+ enable_testing ()
56
67set (CMAKE_C_COMPILE_OPTIONS_TARGET "-target " )
78set (CMAKE_C_COMPILER_TARGET wasm32-unknown-wasi CACHE STRING
@@ -1170,3 +1171,8 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/sysroot/lib/libc.imports
11701171add_custom_target (libc.imports ALL
11711172 DEPENDS ${CMAKE_BINARY_DIR} /sysroot/lib/libc.imports)
11721173add_dependencies (libc.imports c crt1.o)
1174+
1175+ add_test (NAME check-metadata
1176+ COMMAND ${CMAKE_COMMAND} -E compare_files --ignore -eol ${PROJECT_SOURCE_DIR} /expected/wasm32-wasi/predefined-macros .txt ${CMAKE_BINARY_DIR} /sysroot/share/predefined-macros .txt)
1177+ add_test (NAME check-headers
1178+ COMMAND ${CMAKE_C_COMPILER} -target ${CMAKE_C_COMPILER_TARGET} --sysroot=${CMAKE_BINARY_DIR} /sysroot -fsyntax-only "-Wno#warnings" ${CMAKE_BINARY_DIR} /sysroot/share/include -all .c)
You can’t perform that action at this time.
0 commit comments