[cfe-dev] tablegenning projects always build due to add_custom_target
NAKAMURA Takumi
geek4civic at gmail.com
Wed Mar 5 08:33:59 PST 2014
add_custom_command is tough. See also;
4.7 How can I add a dependency to a source file which is generated in
a subdirectory?
4.8 How can I generate a file used in more than one target in the same
directory?
http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_add_a_dependency_to_a_source_file_which_is_generated_in_a_subdirectory.3F
It could be done to generate each clang-tblgen in each user's
directory (not clang/include). But it'd be too redundant.
2014-03-05 18:21 GMT+09:00 Yaron Keren <yaron.keren at gmail.com>:
> While it's true that the project actions don't run, when a tablegenning
> project runs under Visual Studio it writes a command file, updates a
> timestamp file, ... for 41 projects this is non-neglible time.
>
> Would it make sense to use add_custom_command instead of add_custom_target?
>
> Yaron
>
>
>
> 2014-03-05 11:06 GMT+02:00 NAKAMURA Takumi <geek4civic at gmail.com>:
>>
>> I suppose it's possible behavior in Visual Studio (and msbuild.exe).
>> I don't care as far as each generating project would run but it
>> doesn't run any actions.
>>
>> That said, patches welcome :)
>>
>> 2014-03-05 5:24 GMT+09:00 Yaron Keren <yaron.keren at gmail.com>:
>> > Hi,
>> >
>> >
>> > The tablegenning projects of LLVM and clang always run commands since
>> > they
>> > are use add_custom_target which is ALWAYS CONSIDERED OUT OF DATE even if
>> > the
>> > commands try to create a file with the name of the target. See
>> >
>> >
>> > http://www.cmake.org/cmake/help/cmake2.6docs.html#command:add_custom_target
>> >
>> > This causes delay when running clang from an IDE.
>> > 41 projects run their commands without any need before clang runs.
>> >
>> > Is there a better way to handle these targets so they will execute
>> > commands
>> > only when dependencies change, like all the other projects in LLVM?
>> >
>> > Yaron
>> >
>> >
>> >
>
>
More information about the cfe-dev
mailing list