[cmake-developers] Visual Studio Add Custom Target marked Build

J Decker d3ck0r at gmail.com
Wed Jun 13 12:17:55 EDT 2012


On Wed, Jun 13, 2012 at 9:09 AM, David Cole <david.cole at kitware.com> wrote:
> You can get "install_foo" to build always if you include "ALL" as an arg to
> add_custom_target.
>
> You cannot use "INSTALL" in an add_dependencies call, though. Rather, you
> could list the executables that you need built *before* an install could be
> successful -- that should be equivalent, but requires you to list them
> explicitly. See http://public.kitware.com/Bug/view.php?id=8438 for more
> details.
>
Hmm, but what I'm really trying to accomplish is to build INSTALL...
listing the things to build before the install will end up just
building those... and ya, so adding ALL made it a circular dependency
list that won't work unless it's a static library(according to vs2010)

if I could have the install target marked to be built that would be
just as fine.

>
> HTH,
> David
>
>
> On Wed, Jun 13, 2012 at 12:02 PM, J Decker <d3ck0r at gmail.com> wrote:
>>
>> how to add a custom target which is marked as build in a visual studio
>> solution output?
>>
>> I really am trying to get away from devenv, when using devenv, it will
>> build the INSTALL target even though it's not marked for build.  But
>> MSBuild isn't so gracious.... so I added
>>
>>  ADD_CUSTOM_TARGET( install_foo )
>>  ADD_DEPENDENCIES( install_foo INSTALL )
>>
>> but target 'install_foo' also isn't marked to be built.
>> --
>>
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
>
>



More information about the cmake-developers mailing list