2002-01-20 05:24:55 +03:00
|
|
|
#
|
|
|
|
# Testing
|
|
|
|
#
|
2009-03-16 17:51:30 +03:00
|
|
|
cmake_minimum_required (VERSION 2.7)
|
2012-08-13 21:47:32 +04:00
|
|
|
project (Testing)
|
2002-01-20 05:24:55 +03:00
|
|
|
|
|
|
|
#
|
|
|
|
# Lib and exe path
|
|
|
|
#
|
2012-08-13 21:47:32 +04:00
|
|
|
set (LIBRARY_OUTPUT_PATH
|
2012-08-13 21:42:58 +04:00
|
|
|
${Testing_BINARY_DIR}/bin/ CACHE PATH
|
2002-01-20 05:24:55 +03:00
|
|
|
"Single output directory for building all libraries.")
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set (EXECUTABLE_OUTPUT_PATH
|
2012-08-13 21:42:58 +04:00
|
|
|
${Testing_BINARY_DIR}/bin/ CACHE PATH
|
2002-01-20 05:24:55 +03:00
|
|
|
"Single output directory for building all executables.")
|
|
|
|
|
|
|
|
#
|
|
|
|
# Where will executable tests be written ?
|
|
|
|
#
|
2012-08-13 21:47:32 +04:00
|
|
|
if (EXECUTABLE_OUTPUT_PATH)
|
|
|
|
set (CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH})
|
2012-08-13 21:50:14 +04:00
|
|
|
else ()
|
2012-08-13 21:47:32 +04:00
|
|
|
set (CXX_TEST_PATH .)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif ()
|
2002-01-20 05:24:55 +03:00
|
|
|
|
2002-01-20 08:11:59 +03:00
|
|
|
#
|
|
|
|
# Include Dart
|
|
|
|
# (will also set NSLOOKUP, HOSTNAME, etc.)
|
|
|
|
#
|
2012-08-13 21:47:32 +04:00
|
|
|
include (${CMAKE_ROOT}/Modules/Dart.cmake)
|
2002-01-20 08:11:59 +03:00
|
|
|
|
2002-01-20 05:24:55 +03:00
|
|
|
#
|
|
|
|
# Extra coverage
|
|
|
|
#
|
2012-08-13 21:47:32 +04:00
|
|
|
build_command(BUILD_COMMAND_VAR ${CMAKE_MAKE_PROGRAM})
|
|
|
|
build_name(BUILD_NAME_VAR)
|
|
|
|
site_name(SITE_NAME_VAR)
|
2002-01-20 05:24:55 +03:00
|
|
|
|
|
|
|
#
|
|
|
|
# Enable testing
|
|
|
|
#
|
2012-08-13 21:47:32 +04:00
|
|
|
enable_testing()
|
2002-01-20 05:24:55 +03:00
|
|
|
|
|
|
|
#
|
|
|
|
# Add test
|
|
|
|
#
|
2012-08-13 21:47:32 +04:00
|
|
|
add_executable(testing testing.cxx)
|
|
|
|
add_test(testing.1 ${Testing_BINARY_DIR}/bin/testing)
|
2002-01-20 05:24:55 +03:00
|
|
|
|
2002-01-20 08:11:59 +03:00
|
|
|
#
|
2005-06-08 20:26:32 +04:00
|
|
|
# skip level test
|
2002-01-20 08:11:59 +03:00
|
|
|
#
|
2012-08-13 21:47:32 +04:00
|
|
|
add_subdirectory(Sub/Sub2)
|
2009-03-16 17:51:30 +03:00
|
|
|
|
2010-12-08 01:36:24 +03:00
|
|
|
# Per-config target name and generator expressions.
|
2012-08-13 21:47:32 +04:00
|
|
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../PerConfig PerConfig)
|
|
|
|
add_test(NAME testing.perconfig COMMAND perconfig)
|
|
|
|
add_test(NAME testing.driver COMMAND ${PerConfig_COMMAND})
|