Revision: 76089
http://sourceforge.net/p/brlcad/code/76089
Author: starseeker
Date: 2020-06-09 16:50:20 +0000 (Tue, 09 Jun 2020)
Log Message:
-----------
Add a 'managed_files' target to allow other targets to depend on the files
being set up properly.
Modified Paths:
--------------
brlcad/trunk/misc/CMake/BRLCAD_Targets.cmake
brlcad/trunk/regress/user/CMakeLists.txt
Modified: brlcad/trunk/misc/CMake/BRLCAD_Targets.cmake
===================================================================
--- brlcad/trunk/misc/CMake/BRLCAD_Targets.cmake 2020-06-09 16:32:53 UTC
(rev 76088)
+++ brlcad/trunk/misc/CMake/BRLCAD_Targets.cmake 2020-06-09 16:50:20 UTC
(rev 76089)
@@ -702,6 +702,11 @@
function(BRLCAD_MANAGE_FILES inputdata targetdir)
+ if (NOT TARGET managed_files)
+ add_custom_target(managed_files ALL)
+ set_target_properties(managed_files PROPERTIES FOLDER "BRL-CAD File
Copying")
+ endif (NOT TARGET managed_files)
+
string(RANDOM LENGTH 10 ALPHABET 0123456789 VAR_PREFIX)
if(${ARGC} GREATER 2)
CMAKE_PARSE_ARGUMENTS(${VAR_PREFIX} "EXEC" "FOLDER" "" ${ARGN})
@@ -816,6 +821,10 @@
set_target_properties(${targetname}_cp PROPERTIES FOLDER "BRL-CAD File
Copying")
BRLCAD_ADD_DIR_LIST_ENTRY(DATA_TARGETS "${CMAKE_CURRENT_BINARY_DIR}"
${targetname}_cp)
+ # Because the target name for managed files is likely cryptic, we add a
dependency to the managed_files target
+ # so this poriton of the logic can be referenced
+ add_dependencies(managed_files ${targetname}_cp)
+
# Set the FOLDER property. If the target has supplied a folder, use
# that as a subfolder
if("${${VAR_PREFIX}_FOLDER}" STREQUAL "")
Modified: brlcad/trunk/regress/user/CMakeLists.txt
===================================================================
--- brlcad/trunk/regress/user/CMakeLists.txt 2020-06-09 16:32:53 UTC (rev
76088)
+++ brlcad/trunk/regress/user/CMakeLists.txt 2020-06-09 16:50:20 UTC (rev
76089)
@@ -20,6 +20,7 @@
# defintions or other magic specific to BRL-CAD's internal build.
add_executable(cad_user cad_user.c)
target_link_libraries(cad_user libged)
+add_dependencies(cad_user managed_files)
# Include only the folder with the build-output headers (this will be a
# superset of what will be installed, but is the best available option without
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits