File tree 1 file changed +6
-0
lines changed
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)
2
2
3
3
project (wasi-libc
4
4
LANGUAGES C)
5
+ enable_testing ()
5
6
6
7
set (CMAKE_C_COMPILE_OPTIONS_TARGET "-target " )
7
8
set (CMAKE_C_COMPILER_TARGET wasm32-unknown-wasi CACHE STRING
@@ -1169,3 +1170,8 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/sysroot/lib/libc.imports
1169
1170
${PROJECT_SOURCE_DIR} /tools/gen-imports.py)
1170
1171
add_custom_target (libc.imports ALL
1171
1172
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