VirtualBox

source: vbox/trunk/src/libs/libpng-1.6.36/scripts/test.cmake.in@ 82173

Last change on this file since 82173 was 76030, checked in by vboxsync, 6 years ago

libpng-1.6.36: properly export to OSE, and while at it fix EOL style for shell scripts

  • Property svn:eol-style set to native
File size: 991 bytes
Line 
1# test.cmake.in
2
3# Copyright (C) 2016 Glenn Randers-Pehrson
4# Written by Roger Leigh, 2016
5
6# This code is released under the libpng license.
7# For conditions of distribution and use, see the disclaimer
8# and license in png.h
9
10set(TEST_OPTIONS "@TEST_OPTIONS@")
11set(TEST_FILES "@TEST_FILES@")
12
13foreach(file ${TEST_FILES})
14 file(TO_NATIVE_PATH "${file}" native_file)
15 list(APPEND NATIVE_TEST_FILES "${native_file}")
16endforeach()
17
18# Add the directory containing libpng to the PATH (Windows only)
19if(WIN32)
20 get_filename_component(LIBPNG_DIR "${LIBPNG}" PATH)
21 file(TO_NATIVE_PATH "${LIBPNG_DIR}" LIBPNG_DIR)
22 set(ENV{PATH} "${LIBPNG_DIR};$ENV{PATH}")
23endif()
24
25execute_process(COMMAND "${CMAKE_COMMAND}" -E echo "Running ${TEST_COMMAND}" ${TEST_OPTIONS} ${NATIVE_TEST_FILES})
26
27execute_process(COMMAND "${TEST_COMMAND}" ${TEST_OPTIONS} ${NATIVE_TEST_FILES}
28 RESULT_VARIABLE TEST_STATUS)
29if(TEST_STATUS)
30 message(FATAL_ERROR "Returned failed status ${TEST_STATUS}!")
31endif()
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette