浏览代码

BUG: It seems the auto-object-depends feature does not work in Visual Studio. I'm restoring the explicit OBJECT_DEPENDS lines.

Brad King 20 年之前
父节点
当前提交
af5d324574
共有 1 个文件被更改,包括 6 次插入7 次删除
  1. 6 7
      Tests/CustomCommand/CMakeLists.txt

+ 6 - 7
Tests/CustomCommand/CMakeLists.txt

@@ -129,13 +129,12 @@ ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/foo.c
   ${PROJECT_BINARY_DIR}/foo.c
   )
 
-# This object dependency is removed to test the new
-# auto-object-depends feature.  If the feature is removed these lines
-# must be restored.
-#SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/foo.c PROPERTIES
-#  OBJECT_DEPENDS ${PROJECT_BINARY_DIR}/doc1.h)
-#SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/foo.c PROPERTIES
-#  OBJECT_DEPENDS ${PROJECT_BINARY_DIR}/foo.h)
+# These object dependencies can be removed to test the
+# auto-object-depends feature of the Makefile generator.  Currently
+# the feature does not seem to work in Visual Studio generators so
+# these dependencies are needed.
+SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/foo.c PROPERTIES
+  OBJECT_DEPENDS "${PROJECT_BINARY_DIR}/doc1.h;${PROJECT_BINARY_DIR}/foo.h")
 
 # add the library
 ADD_EXECUTABLE(CustomCommand