summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/AutogenTimestampDeps
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/QtAutogen/AutogenTimestampDeps')
-rw-r--r--Tests/QtAutogen/AutogenTimestampDeps/CMakeLists.txt11
-rw-r--r--Tests/QtAutogen/AutogenTimestampDeps/ProjectInfo.hpp.in6
-rw-r--r--Tests/QtAutogen/AutogenTimestampDeps/cmake/UpdateProjectInfo.cmake2
-rw-r--r--Tests/QtAutogen/AutogenTimestampDeps/src/CMakeLists.txt4
-rw-r--r--Tests/QtAutogen/AutogenTimestampDeps/src/main.cpp5
5 files changed, 28 insertions, 0 deletions
diff --git a/Tests/QtAutogen/AutogenTimestampDeps/CMakeLists.txt b/Tests/QtAutogen/AutogenTimestampDeps/CMakeLists.txt
new file mode 100644
index 0000000..3470a02
--- /dev/null
+++ b/Tests/QtAutogen/AutogenTimestampDeps/CMakeLists.txt
@@ -0,0 +1,11 @@
+cmake_minimum_required(VERSION 3.28)
+project(AutogenTimestampDeps)
+include("../AutogenCoreTest.cmake")
+
+set(CMAKE_AUTOMOC ON)
+
+add_custom_target(ProjectInfo
+ COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/UpdateProjectInfo.cmake
+ BYPRODUCTS ${CMAKE_BINARY_DIR}/ProjectInfo.hpp)
+
+add_subdirectory(src)
diff --git a/Tests/QtAutogen/AutogenTimestampDeps/ProjectInfo.hpp.in b/Tests/QtAutogen/AutogenTimestampDeps/ProjectInfo.hpp.in
new file mode 100644
index 0000000..abaa66c
--- /dev/null
+++ b/Tests/QtAutogen/AutogenTimestampDeps/ProjectInfo.hpp.in
@@ -0,0 +1,6 @@
+#ifndef PROJECTINFO_HPP
+#define PROJECTINFO_HPP
+
+extern int VersionMajor;
+
+#endif // PROJECTINFO_HPP
diff --git a/Tests/QtAutogen/AutogenTimestampDeps/cmake/UpdateProjectInfo.cmake b/Tests/QtAutogen/AutogenTimestampDeps/cmake/UpdateProjectInfo.cmake
new file mode 100644
index 0000000..8dd8d55
--- /dev/null
+++ b/Tests/QtAutogen/AutogenTimestampDeps/cmake/UpdateProjectInfo.cmake
@@ -0,0 +1,2 @@
+
+configure_file(${CMAKE_CURRENT_LIST_DIR}/../ProjectInfo.hpp.in ${CMAKE_BINARY_DIR}/ProjectInfo.hpp @ONLY)
diff --git a/Tests/QtAutogen/AutogenTimestampDeps/src/CMakeLists.txt b/Tests/QtAutogen/AutogenTimestampDeps/src/CMakeLists.txt
new file mode 100644
index 0000000..e931248
--- /dev/null
+++ b/Tests/QtAutogen/AutogenTimestampDeps/src/CMakeLists.txt
@@ -0,0 +1,4 @@
+add_executable(Exe main.cpp ${CMAKE_BINARY_DIR}/ProjectInfo.hpp)
+add_dependencies(Exe ProjectInfo)
+target_include_directories(Exe PRIVATE ${CMAKE_BINARY_DIR})
+target_link_libraries(Exe PRIVATE ${QT_QTCORE_TARGET})
diff --git a/Tests/QtAutogen/AutogenTimestampDeps/src/main.cpp b/Tests/QtAutogen/AutogenTimestampDeps/src/main.cpp
new file mode 100644
index 0000000..f3c4c4b
--- /dev/null
+++ b/Tests/QtAutogen/AutogenTimestampDeps/src/main.cpp
@@ -0,0 +1,5 @@
+#include "ProjectInfo.hpp"
+int main(int argc, char* argv[])
+{
+ return 0;
+}