summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorTheBrokenRail <connor24nolan@live.com>2022-07-02 04:18:46 (GMT)
committerBrad King <brad.king@kitware.com>2022-07-06 13:28:21 (GMT)
commit733801b57f61233601e1c11e4cb7ed121ec4fa71 (patch)
treee624552536750b5350701e804a2ffd428f543923 /Tests/RunCMake
parentf1e38ec0a7208836c26c309693c90659e7d0baa7 (diff)
downloadCMake-733801b57f61233601e1c11e4cb7ed121ec4fa71.zip
CMake-733801b57f61233601e1c11e4cb7ed121ec4fa71.tar.gz
CMake-733801b57f61233601e1c11e4cb7ed121ec4fa71.tar.bz2
file(TIMESTAMP): Interpret relative paths w.r.t. the source tree
Fixes: #23610
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/file/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/file/TIMESTAMP-stdout.txt1
-rw-r--r--Tests/RunCMake/file/TIMESTAMP.cmake2
3 files changed, 4 insertions, 0 deletions
diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake
index aff4735..db88956 100644
--- a/Tests/RunCMake/file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file/RunCMakeTest.cmake
@@ -47,6 +47,7 @@ run_cmake(GLOB_RECURSE)
run_cmake(GLOB_RECURSE-noexp-FOLLOW_SYMLINKS)
run_cmake(SIZE)
run_cmake(SIZE-error-does-not-exist)
+run_cmake(TIMESTAMP)
run_cmake(REMOVE-empty)
diff --git a/Tests/RunCMake/file/TIMESTAMP-stdout.txt b/Tests/RunCMake/file/TIMESTAMP-stdout.txt
new file mode 100644
index 0000000..42be6ba
--- /dev/null
+++ b/Tests/RunCMake/file/TIMESTAMP-stdout.txt
@@ -0,0 +1 @@
+-- '[0-9]*-[01][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]:[0-6][0-9]Z'
diff --git a/Tests/RunCMake/file/TIMESTAMP.cmake b/Tests/RunCMake/file/TIMESTAMP.cmake
new file mode 100644
index 0000000..2bd2577
--- /dev/null
+++ b/Tests/RunCMake/file/TIMESTAMP.cmake
@@ -0,0 +1,2 @@
+file(TIMESTAMP "TIMESTAMP.cmake" output UTC)
+message(STATUS "'${output}'")