CMake/Tests/BuildDepends/Project/object_depends_check.cmake
Brad King 783c375766 Tests: Extend BuildDepends test to cover OBJECT_DEPENDS
The actual file timestamp dependency is known to not work on
Visual Studio or Xcode generators.  Tolerate such failure for
these generators (Tests/CustomCommand already covers using
OBJECT_DEPENDS to pull a custom command into a target, and
that still works with these generators).
2015-07-22 11:37:47 -04:00

8 lines
184 B
CMake

if(NOT EXISTS "${txt}" OR NOT EXISTS "${exe}")
file(REMOVE "${out}")
elseif("${exe}" IS_NEWER_THAN "${txt}")
file(WRITE "${out}" "1\n")
else()
file(WRITE "${out}" "0\n")
endif()