Let symbol export tests respect SPIRV_SKIP_TESTS

This commit is contained in:
Lei Zhang 2018-07-04 14:20:52 -04:00 committed by GitHub
parent 30a9cefa1d
commit 4926f295b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -170,13 +170,17 @@ find_host_package(PythonInterp)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
macro(spvtools_check_symbol_exports TARGET)
add_test(NAME spirv-tools-symbol-exports-${TARGET}
COMMAND ${PYTHON_EXECUTABLE}
${spirv-tools_SOURCE_DIR}/utils/check_symbol_exports.py "$<TARGET_FILE:${TARGET}>")
if (NOT "${SPIRV_SKIP_TESTS}")
add_test(NAME spirv-tools-symbol-exports-${TARGET}
COMMAND ${PYTHON_EXECUTABLE}
${spirv-tools_SOURCE_DIR}/utils/check_symbol_exports.py "$<TARGET_FILE:${TARGET}>")
endif()
endmacro()
else()
macro(spvtools_check_symbol_exports TARGET)
message("Skipping symbol exports test for ${TARGET}")
if (NOT "${SPIRV_SKIP_TESTS}")
message("Skipping symbol exports test for ${TARGET}")
endif()
endmacro()
endif()