1 # - MACRO_ADD_FILE_DEPENDENCIES(<_file> depend_files...)
2 # Using the macro MACRO_ADD_FILE_DEPENDENCIES() is discouraged. There are usually
3 # better ways to specify the correct dependencies.
5 # MACRO_ADD_FILE_DEPENDENCIES(<_file> depend_files...) is just a convenience
6 # wrapper around the OBJECT_DEPENDS source file property. You can just
7 # use set_property(SOURCE <file> APPEND PROPERTY OBJECT_DEPENDS depend_files) instead.
9 #=============================================================================
10 # Copyright 2006-2009 Kitware, Inc.
12 # Distributed under the OSI-approved BSD License (the "License");
13 # see accompanying file Copyright.txt for details.
15 # This software is distributed WITHOUT ANY WARRANTY; without even the
16 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 # See the License for more information.
18 #=============================================================================
19 # (To distribute this file outside of CMake, substitute the full
20 # License text for the above reference.)
22 macro (MACRO_ADD_FILE_DEPENDENCIES _file)
24 get_source_file_property(_deps ${_file} OBJECT_DEPENDS)
26 set(_deps ${_deps} ${ARGN})
31 set_source_files_properties(${_file} PROPERTIES OBJECT_DEPENDS "${_deps}")