summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorBetsy McPhail <betsy.mcphail@kitware.com>2020-08-03 21:25:12 (GMT)
committerBrad King <brad.king@kitware.com>2020-09-11 12:50:52 (GMT)
commit3310801aabbdcd32f82433fbd04237a1ab1744d4 (patch)
tree976a72a5cabaf12d5f74be29f4b1e5df229dbab5 /Tests/CMakeLists.txt
parent5b3644fba6b3a9eb56070d8ba8f3b9b6281ba62b (diff)
downloadCMake-3310801aabbdcd32f82433fbd04237a1ab1744d4.zip
CMake-3310801aabbdcd32f82433fbd04237a1ab1744d4.tar.gz
CMake-3310801aabbdcd32f82433fbd04237a1ab1744d4.tar.bz2
Help: Add Importing and Exporting Guide
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt40
1 files changed, 39 insertions, 1 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 95162ec..e409ce0 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1654,7 +1654,7 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
set_tests_properties(${tutorial_test_name} PROPERTIES
PASS_REGULAR_EXPRESSION ${pass_regex})
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/${tutorial_build_dir}_Build")
+ list(APPEND TEST_BUILD_DIRS "${tutorial_build_dir}_Build")
endfunction()
if(NOT CMake_TEST_EXTERNAL_CMAKE)
@@ -1674,6 +1674,44 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH
add_tutorial_test(Complete FALSE 25 ${pass_regex})
endif()
+ function(add_importexport_test export_name import_name)
+ set(install_dir
+ "${CMake_BINARY_DIR}/Tests/ImportExport/Install${export_name}")
+ set(export_build_dir "${CMake_BINARY_DIR}/Tests/ImportExport/${export_name}Build")
+ set(export_test_name "Guide.ImportExport.${export_name}")
+ add_test(${export_test_name} ${CMAKE_CTEST_COMMAND}
+ -C "Release"
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Help/guide/importing-exporting/${export_name}"
+ "${export_build_dir}"
+ ${build_generator_args}
+ --build-project ${export_name}
+ --build-target install
+ --build-options
+ "-DCMAKE_INSTALL_PREFIX:PATH=${install_dir}")
+ list(APPEND TEST_BUILD_DIRS "${export_build_dir}")
+
+ set(import_build_dir "${CMake_BINARY_DIR}/Tests/ImportExport/${import_name}Build")
+ set(import_test_name "Guide.ImportExport.${import_name}")
+ add_test(${import_test_name} ${CMAKE_CTEST_COMMAND}
+ -C "Release"
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Help/guide/importing-exporting/${import_name}"
+ "${import_build_dir}"
+ ${build_generator_args}
+ --build-project ${import_name}
+ --build-options
+ "-DCMAKE_PREFIX_PATH:PATH=${install_dir}/lib/cmake")
+ set_tests_properties(${import_test_name} PROPERTIES DEPENDS ${export_test_name})
+ list(APPEND TEST_BUILD_DIRS "${import_build_dir}")
+ endfunction()
+
+ if(NOT CMake_TEST_EXTERNAL_CMAKE)
+ add_importexport_test("MyExe" "Importing")
+ add_importexport_test("MathFunctions" "Downstream")
+ add_importexport_test("MathFunctionsComponents" "DownstreamComponents")
+ endif()
+
add_test(testing ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/Testing"