summaryrefslogtreecommitdiffstats
path: root/Templates
diff options
context:
space:
mode:
authorSylvain Joubert <joubert.sy@gmail.com>2021-10-04 13:28:18 (GMT)
committerBrad King <brad.king@kitware.com>2021-10-04 15:00:12 (GMT)
commitba54092842f8eb712f57448c33763cb56d8931da (patch)
treee62b26f0dc2cdb617ad9a0a577de5f417d3b7ee5 /Templates
parentd1a7e78c4fb4bc92e6fb6b9ba2edb839047fb66c (diff)
downloadCMake-ba54092842f8eb712f57448c33763cb56d8931da.zip
CMake-ba54092842f8eb712f57448c33763cb56d8931da.tar.gz
CMake-ba54092842f8eb712f57448c33763cb56d8931da.tar.bz2
TestDriver: Fix old-style-cast warning in C++ mode
A C-style cast was added by commit 3f6ff4b5db (create_test_sourcelist: add test driver option to run all tests, 2021-04-27, v3.21.0-rc1~257^2). Use our `CM_CAST` macro to adapt based on the language.
Diffstat (limited to 'Templates')
-rw-r--r--Templates/TestDriver.cxx.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/Templates/TestDriver.cxx.in b/Templates/TestDriver.cxx.in
index 6ced800..632bb80 100644
--- a/Templates/TestDriver.cxx.in
+++ b/Templates/TestDriver.cxx.in
@@ -138,7 +138,7 @@ int main(int ac, char* av[])
t = clock() - t;
status_message = (status == -1) ? "not ok" : "ok";
{
- double time_taken = ((double)t) / CLOCKS_PER_SEC;
+ double time_taken = CM_CAST(double, t) / CLOCKS_PER_SEC;
printf("%s %d %s # %f\n", status_message, i + 1, name, time_taken);
}
}