CMake/Tests/RunCMake/AndroidTestUtilities/RunCMakeTest.cmake
Zack Galbreath 8a5cb84b0e AndroidTestUtilities: do not require ExternalData unconditionally
Attempting to use AndroidTestUtilities to simply install some local
files on device can result in the following error:

    Neither ExternalData_URL_TEMPLATES nor ExternalData_OBJECT_STORES is set

We no longer require these ExternalData-specific variables to be set if
no such remote data files are requested.

Fixes: #16529
2017-02-04 08:16:24 -05:00

22 lines
637 B
CMake

include(RunCMake)
function(run_ATU case target)
# Use a single build tree for a few tests without cleaning.
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build)
set(RunCMake_TEST_NO_CLEAN 1)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
if(target)
set(build_args --target ${target})
else()
set(build_args)
endif()
run_cmake(${case})
run_cmake_command(${case}Build ${CMAKE_COMMAND} --build . --config Debug ${build_args})
endfunction()
run_ATU(SetupTest1 "")
run_ATU(SetupTest2 "tests")
run_ATU(SetupTest3 "tests")
run_ATU(SetupTest4 "")