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
@@ -1169,3 +1170,8 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/sysroot/lib/libc.imports
11691170 ${PROJECT_SOURCE_DIR} /tools/gen-imports.py)
11701171add_custom_target (libc.imports ALL
11711172 DEPENDS ${CMAKE_BINARY_DIR} /sysroot/lib/libc.imports)
1173+
1174+ add_test (NAME check-metadata
1175+ 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)
1176+ add_test (NAME check-headers
1177+ 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