From b341799e53e468a02bca78e3270e60ddccf8b4f3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 22 Dec 2014 10:34:12 -0500 Subject: [PATCH] Tests: Fix RunCMake.CompileFeatures test NonValidTarget2 case Mark the generated source file with the GENERATED property explicitly since it is not marked automatically as the output of any custom command. Mark both the 0 and 1 variants so it works no matter the outcome of the generator expression. --- Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake b/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake index eb84692cb..c41bf57cc 100644 --- a/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake +++ b/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake @@ -4,5 +4,7 @@ set(genexvar $) add_custom_target(copy_target COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.txt" ) +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/copied_file0.cpp" PROPERTY GENERATED 1) +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/copied_file1.cpp" PROPERTY GENERATED 1) add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.cpp")