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)
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
@@ -1170,3 +1171,8 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/sysroot/lib/libc.imports
1170
1171
${PROJECT_SOURCE_DIR} /tools/gen-imports.py )
1171
1172
add_custom_target (libc.imports ALL
1172
1173
DEPENDS ${CMAKE_BINARY_DIR} /sysroot/lib/libc.imports )
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