[brlcad-commits] SF.net SVN: brlcad:[49178] brlcad/trunk/CMakeLists.txt
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <sta...@us...> - 2012-02-01 22:06:05
|
Revision: 49178 http://brlcad.svn.sourceforge.net/brlcad/?rev=49178&view=rev Author: starseeker Date: 2012-02-01 22:05:58 +0000 (Wed, 01 Feb 2012) Log Message: ----------- We aren't currently using ExternalProject_Add, but add in a little more of what would be needed if we did add a use of that macro with a note on what else would be necessary. Modified Paths: -------------- brlcad/trunk/CMakeLists.txt Modified: brlcad/trunk/CMakeLists.txt =================================================================== --- brlcad/trunk/CMakeLists.txt 2012-02-01 21:49:11 UTC (rev 49177) +++ brlcad/trunk/CMakeLists.txt 2012-02-01 22:05:58 UTC (rev 49178) @@ -321,9 +321,11 @@ define_property(GLOBAL PROPERTY CMAKE_LIBRARY_TARGET_LIST BRIEF_DOCS "libtarget list" FULL_DOCS "Library target list") define_property(GLOBAL PROPERTY CMAKE_EXEC_TARGET_LIST BRIEF_DOCS "exec target list" FULL_DOCS "Executable target list") define_property(GLOBAL PROPERTY CMAKE_CUSTOM_TARGET_LIST BRIEF_DOCS "custom target list" FULL_DOCS "Custom target list") + define_property(GLOBAL PROPERTY CMAKE_EXTERNAL_TARGET_LIST BRIEF_DOCS "external target list" FULL_DOCS "External target list") mark_as_advanced(CMAKE_LIBRARY_TARGET_LIST) mark_as_advanced(CMAKE_EXEC_TARGET_LIST) mark_as_advanced(CMAKE_CUSTOM_TARGET_LIST) + mark_as_advanced(CMAKE_EXTERNAL_TARGET_LIST) # Need build_files_list to be clear each CMake run file(WRITE ${CMAKE_BINARY_DIR}/build_files_list.txt "") @@ -355,6 +357,11 @@ set_property(GLOBAL APPEND PROPERTY CMAKE_CUSTOM_TARGET_LIST ${name}) endfunction(add_custom_target) + # Note that at the moment we do not need to override CMake's external + # project mechanisms because CMake does not use them, but if that changes + # in the future an override will need to be added here - probably of the + # ExternalProject_Add functionality. + # Override and wrap configure_file. In the case of a configure_file, we'll # check that the file is part of the source tree and not itself a # generated file, but not reject full-path entries since there are quite a @@ -1736,48 +1743,49 @@ get_property(CMAKE_LIBRARY_TARGET_LIST GLOBAL PROPERTY CMAKE_LIBRARY_TARGET_LIST) get_property(CMAKE_EXEC_TARGET_LIST GLOBAL PROPERTY CMAKE_EXEC_TARGET_LIST) get_property(CMAKE_CUSTOM_TARGET_LIST GLOBAL PROPERTY CMAKE_CUSTOM_TARGET_LIST) + get_property(CMAKE_EXTERNAL_TARGET_LIST GLOBAL PROPERTY CMAKE_EXTERNAL_TARGET_LIST) mark_as_advanced(CMAKE_LIBRARY_TARGET_LIST) mark_as_advanced(CMAKE_EXEC_TARGET_LIST) mark_as_advanced(CMAKE_CUSTOM_TARGET_LIST) - LIST(REMOVE_DUPLICATES CMAKE_LIBRARY_TARGET_LIST) - LIST(REMOVE_DUPLICATES CMAKE_EXEC_TARGET_LIST) - LIST(REMOVE_DUPLICATES CMAKE_CUSTOM_TARGET_LIST) + mark_as_advanced(CMAKE_EXTERNAL_TARGET_LIST) + list(REMOVE_DUPLICATES CMAKE_LIBRARY_TARGET_LIST) + list(REMOVE_DUPLICATES CMAKE_EXEC_TARGET_LIST) + list(REMOVE_DUPLICATES CMAKE_CUSTOM_TARGET_LIST) if(CMAKE_EXTERNAL_TARGET_LIST) - LIST(REMOVE_DUPLICATES CMAKE_EXTERNAL_TARGET_LIST) + list(REMOVE_DUPLICATES CMAKE_EXTERNAL_TARGET_LIST) endif(CMAKE_EXTERNAL_TARGET_LIST) foreach(libtarget ${CMAKE_LIBRARY_TARGET_LIST}) get_target_property(target_location ${libtarget} LOCATION_${CMAKE_BUILD_TYPE}) if(target_location) - ADD_DEPENDENCIES(${libtarget} timestamp) - ADD_DEPENDENCIES(buildtimedelta ${libtarget}) + add_dependencies(${libtarget} timestamp) + add_dependencies(buildtimedelta ${libtarget}) endif(target_location) endforeach(libtarget ${CMAKE_LIBRARY_TARGET_LIST}) foreach(exectarget ${CMAKE_EXEC_TARGET_LIST}) get_target_property(target_location ${exectarget} LOCATION_${CMAKE_BUILD_TYPE}) if(target_location) - if(NOT ${exectarget} MATCHES "printtimestamp" - AND NOT ${exectarget} MATCHES "buildtimestart") - ADD_DEPENDENCIES(${exectarget} timestamp) + if(NOT ${exectarget} MATCHES "printtimestamp" AND NOT ${exectarget} MATCHES "buildtimestart") + add_dependencies(${exectarget} timestamp) endif() - ADD_DEPENDENCIES(buildtimedelta ${exectarget}) + add_dependencies(buildtimedelta ${exectarget}) endif(target_location) endforeach(exectarget ${CMAKE_EXEC_TARGET_LIST}) foreach(custtarget ${CMAKE_CUSTOM_TARGET_LIST}) if(NOT ${custtarget} MATCHES "timestamp") - ADD_DEPENDENCIES(${custtarget} timestamp) + add_dependencies(${custtarget} timestamp) endif() if(NOT ${custtarget} MATCHES "buildtimedelta") get_target_property(not_in_all ${custtarget} EXCLUDE_FROM_ALL) if(NOT not_in_all) - ADD_DEPENDENCIES(buildtimedelta ${custtarget}) + add_dependencies(buildtimedelta ${custtarget}) endif(NOT not_in_all) endif(NOT ${custtarget} MATCHES "buildtimedelta") endforeach(custtarget ${CMAKE_CUSTOM_TARGET_LIST}) foreach(externaltarget ${CMAKE_EXTERNAL_TARGET_LIST}) get_target_property(target_confcmd ${externaltarget} _EP_CONFIGURE_COMMAND) if(target_confcmd) - ADD_DEPENDENCIES(${externaltarget} timestamp) - ADD_DEPENDENCIES(buildtimedelta ${externaltarget}) + add_dependencies(${externaltarget} timestamp) + add_dependencies(buildtimedelta ${externaltarget}) endif(target_confcmd) endforeach(externaltarget ${CMAKE_EXTERNAL_TARGET_LIST}) endif(NOT IS_SUBBUILD) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |