summaryrefslogtreecommitdiffstats
path: root/Tests/FindDoxygen/StampFile/CMakeLists.txt
diff options
context:
space:
mode:
authorNikita Sirgienko <warquark@gmail.com>2019-04-16 11:37:45 (GMT)
committerCraig Scott <craig.scott@crascit.com>2019-09-05 23:12:09 (GMT)
commit611eb26b9db1b0ff1e83a6983b6cdf79f2dca0d5 (patch)
tree232bbbaac29255caa6369ce70ac14f3e64265084 /Tests/FindDoxygen/StampFile/CMakeLists.txt
parent3ec986ce8e8df269eb6b6b9f37e12b02194168fd (diff)
downloadCMake-611eb26b9db1b0ff1e83a6983b6cdf79f2dca0d5.zip
CMake-611eb26b9db1b0ff1e83a6983b6cdf79f2dca0d5.tar.gz
CMake-611eb26b9db1b0ff1e83a6983b6cdf79f2dca0d5.tar.bz2
FindDoxygen: add USE_STAMP_FILE option
The new option enables the behavior of only building if sources change.
Diffstat (limited to 'Tests/FindDoxygen/StampFile/CMakeLists.txt')
-rw-r--r--Tests/FindDoxygen/StampFile/CMakeLists.txt24
1 files changed, 24 insertions, 0 deletions
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)