You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libepoxy/cmake/epoxy_run_test_wrapper.cmake

18 lines
734 B

cmake_minimum_required (VERSION 3.0)
if (NOT CMAKE_VERSION VERSION_LESS "3.1")
cmake_policy (SET CMP0054 OLD)
endif ()
if (WIN32 AND DEFINED EPOXY_SHARED_LIB)
get_filename_component (EPOXY_SHARED_LIB_DIR "${EPOXY_SHARED_LIB}" DIRECTORY)
file (TO_NATIVE_PATH "${EPOXY_SHARED_LIB_DIR}" EPOXY_SHARED_LIB_DIR)
if (NOT DEFINED ENV{PATH} OR ENV{PATH} STREQUAL "")
set (ENV{PATH} "${EPOXY_SHARED_LIB_DIR}")
else ()
set (ENV{PATH} "${EPOXY_SHARED_LIB_DIR};$ENV{PATH}")
endif ()
endif ()
execute_process (COMMAND "${EPOXY_TEST_CMD}" RESULT_VARIABLE TEST_RETURN_VAL)
if (NOT TEST_RETURN_VAL EQUAL 0 AND NOT TEST_RETURN_VAL EQUAL 77)
message (FATAL_ERROR "Test has failed!")
endif ()