summaryrefslogtreecommitdiff
path: root/Modules/ExternalData.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-02-03 11:49:47 -0500
committerBrad King <brad.king@kitware.com>2013-02-04 15:20:03 -0500
commit1fd8d017e6b548520b7f2aa8dcc6ce39a2ec3137 (patch)
tree1a52786b3b70aee624ab7a3834bd8ee19d142130 /Modules/ExternalData.cmake
parenta6d3ffcb1fa71395cb0d865b3c79450280554651 (diff)
downloadcmake-1fd8d017e6b548520b7f2aa8dcc6ce39a2ec3137.tar.gz
ExternalData: Attach download rules to content links in IDEs
Each data file to be created in the build tree corresponds one-to-one with a raw file or content link in the source tree. Use the MAIN_DEPENDENCY of add_custom_command to attach the build rule to the source tree file. This looks much nicer in the IDE project file browser and avoids ".rule" files.
Diffstat (limited to 'Modules/ExternalData.cmake')
-rw-r--r--Modules/ExternalData.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/ExternalData.cmake b/Modules/ExternalData.cmake
index 825b7b8716..9d84f8d135 100644
--- a/Modules/ExternalData.cmake
+++ b/Modules/ExternalData.cmake
@@ -191,7 +191,7 @@ function(ExternalData_add_target target)
-DExternalData_ACTION=local
-DExternalData_CONFIG=${config}
-P ${_ExternalData_SELF}
- DEPENDS "${name}"
+ MAIN_DEPENDENCY "${name}"
)
list(APPEND files "${file}")
endif()
@@ -222,7 +222,7 @@ function(ExternalData_add_target target)
-DExternalData_CONFIG=${config}
-P ${_ExternalData_SELF}
# Update whenever the object hash changes.
- DEPENDS "${name}${ext}"
+ MAIN_DEPENDENCY "${name}${ext}"
)
list(APPEND files "${file}${stamp}")
endif()