[CMake] Placement of .rule files under MSVS 2010 generator

Alexander Ivaniuk rride.a at gmail.com
Thu Nov 18 11:32:16 EST 2010


Hello,

I'm using CMake custom commands to copy files from a source directory to a
project binary one. The copying commands itself looks this way:

add_custom_command( OUTPUT "${dest_file}"
 COMMAND "${CMAKE_COMMAND}" -E copy "${src_file}" "${dest_file}"
 DEPENDS "${src_file}"
)

After all "add_custom_command" calls a custom target is created that depends
on all copied files

add_custom_target( copy_files_targ ALL DEPENDS ${dest_file1} ${dest_file2}
)


After generation of Visual Studio's solution and project files I found out
that a whole bunch of .rule had been created in the output directory.

So, while the source dir has the following contents: config1.xml,
config2.xml, config3.xml, the destination directory contains two times more
files: config1.xml, config2.xml, config3.xml and config1.xml.rule,
config2.xml.rule, config3.xml.rule.

I don't want to have all those additional files in the destination folder.
So the question is: is there a way to put ".rule" files into another dir?

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101118/6d6e0a98/attachment.htm>


More information about the CMake mailing list