2012-01-12 02:04:04 +04:00
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Test.cmake.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/Test.cmake @ONLY)
|
|
|
|
|
|
|
|
macro(add_CMakeOnly_test test)
|
|
|
|
add_test(CMakeOnly.${test} ${CMAKE_CMAKE_COMMAND}
|
|
|
|
-DTEST=${test}
|
|
|
|
-P ${CMAKE_CURRENT_BINARY_DIR}/Test.cmake
|
|
|
|
)
|
|
|
|
endmacro()
|
2012-01-03 02:04:42 +04:00
|
|
|
|
2012-01-12 19:22:00 +04:00
|
|
|
add_CMakeOnly_test(LinkInterfaceLoop)
|
|
|
|
set_property(TEST CMakeOnly.LinkInterfaceLoop PROPERTY TIMEOUT 90)
|
2012-01-17 00:03:23 +04:00
|
|
|
|
2012-01-03 02:04:42 +04:00
|
|
|
add_CMakeOnly_test(CheckSymbolExists)
|
|
|
|
|
|
|
|
add_CMakeOnly_test(CheckCXXSymbolExists)
|
2012-01-17 02:37:13 +04:00
|
|
|
|
2012-01-18 02:53:26 +04:00
|
|
|
add_CMakeOnly_test(CheckCXXCompilerFlag)
|
|
|
|
|
2012-02-08 19:48:34 +04:00
|
|
|
add_CMakeOnly_test(CheckLanguage)
|
|
|
|
|
2012-08-21 21:30:50 +04:00
|
|
|
add_CMakeOnly_test(CompilerIdC)
|
|
|
|
add_CMakeOnly_test(CompilerIdCXX)
|
|
|
|
if(CMAKE_Fortran_COMPILER)
|
|
|
|
add_CMakeOnly_test(CompilerIdFortran)
|
|
|
|
endif()
|
|
|
|
|
2012-01-17 02:37:13 +04:00
|
|
|
add_CMakeOnly_test(AllFindModules)
|
2012-01-25 23:04:26 +04:00
|
|
|
|
2012-10-21 17:17:20 +04:00
|
|
|
add_CMakeOnly_test(SelectLibraryConfigurations)
|
|
|
|
|
2012-01-25 23:04:26 +04:00
|
|
|
add_CMakeOnly_test(TargetScope)
|
2012-02-17 21:41:39 +04:00
|
|
|
|
2012-07-20 18:19:16 +04:00
|
|
|
add_CMakeOnly_test(find_library)
|
|
|
|
|
2012-02-17 21:41:39 +04:00
|
|
|
add_test(CMakeOnly.ProjectInclude ${CMAKE_CMAKE_COMMAND}
|
|
|
|
-DTEST=ProjectInclude
|
|
|
|
-DCMAKE_ARGS=-DCMAKE_PROJECT_ProjectInclude_INCLUDE=${CMAKE_CURRENT_SOURCE_DIR}/ProjectInclude/include.cmake
|
|
|
|
-P ${CMAKE_CURRENT_BINARY_DIR}/Test.cmake
|
|
|
|
)
|
2012-10-24 21:55:14 +04:00
|
|
|
|
|
|
|
include(${CMAKE_SOURCE_DIR}/Modules/CMakeParseArguments.cmake)
|
|
|
|
|
|
|
|
function(add_major_test module)
|
|
|
|
cmake_parse_arguments(MAJOR_TEST "NOLANG" "VERSION_VAR" "VERSIONS" ${ARGN})
|
|
|
|
foreach (_version IN LISTS MAJOR_TEST_VERSIONS)
|
|
|
|
add_test(CMakeOnly.MajorVersionSelection-${module}_${_version}
|
|
|
|
${CMAKE_CMAKE_COMMAND}
|
|
|
|
-DTEST=MajorVersionSelection-${module}_${_version}
|
|
|
|
-DTEST_SOURCE=MajorVersionSelection
|
|
|
|
"-DCMAKE_ARGS=-DMAJOR_TEST_MODULE=${module};-DMAJOR_TEST_VERSION=${_version};-DMAJOR_TEST_NO_LANGUAGES=${MAJOR_TEST_NOLANG};-DMAJOR_TEST_VERSION_VAR=${MAJOR_TEST_VERSION_VAR}"
|
|
|
|
-P ${CMAKE_CURRENT_BINARY_DIR}/Test.cmake
|
|
|
|
)
|
|
|
|
endforeach ()
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
add_major_test(PythonLibs VERSIONS 2 3 VERSION_VAR PYTHONLIBS_VERSION_STRING)
|
|
|
|
add_major_test(PythonInterp NOLANG VERSIONS 2 3 VERSION_VAR PYTHON_VERSION_STRING)
|
2012-10-24 21:56:30 +04:00
|
|
|
add_major_test(Qt VERSIONS 3 4 VERSION_VAR QT_VERSION_STRING)
|