https://github.com/Kitware/CMake
Raw File
Tip revision: 21e60da5bb0715e09f2feba5930ea2c8bc8180af authored by Brad King on 21 January 2020, 15:17:47 UTC
CMake 3.16.3
Tip revision: 21e60da
String-TIMESTAMP-AllSpecifiers.cmake
string(TIMESTAMP output "%d;%H;%I;%j;%m;%M;%S;%U;%w;%y;%Y")
message("~${output}~")

list(LENGTH output output_length)

set(expected_output_length 11)

if(NOT output_length EQUAL ${expected_output_length})
    message(FATAL_ERROR "expected ${expected_output_length} entries in output "
        "with all specifiers; found ${output_length}")
endif()
back to top