diff options
author | Craig Scott <craig.scott@crascit.com> | 2019-09-06 00:03:30 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-09-06 00:03:55 (GMT) |
commit | a2d4968ab914d5cf02457306ec8f76177a794520 (patch) | |
tree | 045c889282dd67d257a922211e3e51e16f6ab260 /Tests | |
parent | 6db8f6a410d99e9a66847530bb520b329d2f1a9e (diff) | |
parent | 611eb26b9db1b0ff1e83a6983b6cdf79f2dca0d5 (diff) | |
download | CMake-a2d4968ab914d5cf02457306ec8f76177a794520.zip CMake-a2d4968ab914d5cf02457306ec8f76177a794520.tar.gz CMake-a2d4968ab914d5cf02457306ec8f76177a794520.tar.bz2 |
Merge topic 'doxygen-add-docs-USE_STAMP_FILE'
611eb26b9d FindDoxygen: add USE_STAMP_FILE option
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3238
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/FindDoxygen/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/FindDoxygen/StampFile/CMakeLists.txt | 24 | ||||
-rw-r--r-- | Tests/FindDoxygen/StampFile/main.cpp | 4 | ||||
-rw-r--r-- | Tests/FindDoxygen/StampFile/main2.cpp | 4 |
4 files changed, 42 insertions, 0 deletions
diff --git a/Tests/FindDoxygen/CMakeLists.txt b/Tests/FindDoxygen/CMakeLists.txt index 7ce98d5..41e6255 100644 --- a/Tests/FindDoxygen/CMakeLists.txt +++ b/Tests/FindDoxygen/CMakeLists.txt @@ -28,6 +28,16 @@ add_test(NAME FindDoxygen.AllTarget COMMAND --test-command ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> ) +add_test(NAME FindDoxygen.StampFile COMMAND + ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindDoxygen/StampFile" + "${CMake_BINARY_DIR}/Tests/FindDoxygen/StampFile" + --build-target allDocTargets + ${build_generator_args} + --build-options ${build_options} +) + if(CMake_TEST_FindDoxygen_Dot) add_test(NAME FindDoxygen.DotComponentTest COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> diff --git a/Tests/FindDoxygen/StampFile/CMakeLists.txt b/Tests/FindDoxygen/StampFile/CMakeLists.txt new file mode 100644 index 0000000..2d06540 --- /dev/null +++ b/Tests/FindDoxygen/StampFile/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.8) +project(TestFindDoxygen VERSION 1.0 LANGUAGES NONE) + +find_package(Doxygen REQUIRED) + +doxygen_add_docs(docsWithoutFilesWithStamp USE_STAMP_FILE) +if(NOT EXISTS "${PROJECT_BINARY_DIR}/Doxyfile.docsWithoutFilesWithStamp") + message(FATAL_ERROR "Missing generated file: Doxyfile.docsWithoutFilesWithStamp") +endif() +if(NOT TARGET docsWithoutFilesWithStamp) + message(FATAL_ERROR "Target docsWithoutFilesWithStamp not created") +endif() + +doxygen_add_docs(docsWithFilesWithStamp main.cpp main2.cpp USE_STAMP_FILE) +if(NOT EXISTS "${PROJECT_BINARY_DIR}/Doxyfile.docsWithFilesWithStamp") + message(FATAL_ERROR "Missing generated file: Doxyfile.docsWithFilesWithStamp") +endif() +if(NOT TARGET docsWithFilesWithStamp) + message(FATAL_ERROR "Target docsWithFilesWithStamp not created") +endif() + + +add_custom_target(allDocTargets) +add_dependencies(allDocTargets docsWithoutFilesWithStamp docsWithFilesWithStamp) diff --git a/Tests/FindDoxygen/StampFile/main.cpp b/Tests/FindDoxygen/StampFile/main.cpp new file mode 100644 index 0000000..925f0af --- /dev/null +++ b/Tests/FindDoxygen/StampFile/main.cpp @@ -0,0 +1,4 @@ +/** + * \file + * \brief One C++ file w/ sample Doxygen comment just to produce any docs... + */ diff --git a/Tests/FindDoxygen/StampFile/main2.cpp b/Tests/FindDoxygen/StampFile/main2.cpp new file mode 100644 index 0000000..925f0af --- /dev/null +++ b/Tests/FindDoxygen/StampFile/main2.cpp @@ -0,0 +1,4 @@ +/** + * \file + * \brief One C++ file w/ sample Doxygen comment just to produce any docs... + */ |