blob: cded22f1969fa1ca81882ce5d8f3f25a4da5cc68 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
include(RunCMake)
function(run_SWIG test)
cmake_parse_arguments(_SWIG_TEST "" "TARGET" "" ${ARGN})
if (_SWIG_TEST_TARGET)
list (INSERT _SWIG_TEST_TARGET 0 --target)
endif()
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${test}-build)
set(RunCMake_TEST_NO_CLEAN 1)
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
set (RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Release)
endif()
run_cmake(${test})
run_cmake_command(${test}-test ${CMAKE_COMMAND} --build ${RunCMake_TEST_BINARY_DIR} --config Release ${_SWIG_TEST_TARGET})
endfunction()
run_SWIG(LegacyPython TARGET RunTest)
run_SWIG(LegacyPerl TARGET RunTest)
run_SWIG(BasicPython TARGET RunTest)
run_SWIG(BasicPerl TARGET RunTest)
run_SWIG(MultipleModules)
run_SWIG(MultiplePython)
|