CMake 2.8.12 and lower allowed the SOURCE signature in add_custom_command
In CMake 3.0 the policy CMP0050 was introduced where it could be set to OLD to keep this behaviour while for NEW an error was raised. Since CMake 3.5.2 a warning comes up when using the OLD behaviour and that it will be removed in a future version. In FreeCAD we switched to the new behaviour now and removed the SOURCE signature from add_custom_command which affects the macros fc_copy_sources, fc_target_copy_resource and fc_target_copy_resource_flat and their usage. It's not possible any more to add files to a target by using the macros. Now a file must be added to the target before using the macros. This commit fixes it for Arch, Draft, OpenSCAD, Material, Plot and Ship
This commit is contained in:
@@ -15,9 +15,9 @@ MACRO (fc_copy_sources target_name outpath)
|
||||
add_file_dependencies("${infile}" "${outfile}")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${infile}" "${outfile}"
|
||||
TARGET ${target_name}
|
||||
OUTPUTS "${outfile}"
|
||||
OUTPUT "${outfile}"
|
||||
COMMENT "Copying ${infile} to ${outfile}${fc_details}"
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
||||
endforeach(it)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
@@ -49,9 +49,9 @@ MACRO (fc_target_copy_resource target_name inpath outpath)
|
||||
add_file_dependencies("${infile}" "${outfile}")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${infile}" "${outfile}"
|
||||
TARGET ${target_name}
|
||||
OUTPUTS "${outfile}"
|
||||
OUTPUT "${outfile}"
|
||||
COMMENT "Copying ${infile} to ${outfile}${fc_details}"
|
||||
MAIN_DEPENDENCY "${infile}"
|
||||
)
|
||||
endforeach(it)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
|
||||
Reference in New Issue
Block a user