[cmake-developers] Tests for PRE_BUILD | PRE_LINK | POST_BUILD

James Bigler jamesbigler at gmail.com
Wed Dec 12 14:10:59 EST 2012


I just noticed something when I wanted to try and add a test.  I think the
test might have already been there, but it was broken due to a copy/paste
error:

Tests/Complex/Executable/CMakeLists.txt

# Test pre-build/pre-link/post-build rules for an executable.
add_custom_command(TARGET complex PRE_BUILD
                   COMMAND ${CREATE_FILE_EXE}
                   ARGS "${Complex_BINARY_DIR}/Executable/prebuild.txt")
add_custom_command(TARGET complex PRE_LINK
                   COMMAND ${CREATE_FILE_EXE}
                   ARGS "${Complex_BINARY_DIR}/Executable/prelink.txt")
add_custom_command(TARGET complex POST_BUILD
                   COMMAND ${CREATE_FILE_EXE}
                   ARGS "${Complex_BINARY_DIR}/Executable/postbuild.txt")
add_custom_command(TARGET complex POST_BUILD
                   COMMAND ${CMAKE_COMMAND}
                   ARGS -E copy
                        "${Complex_BINARY_DIR}/Executable/postbuild.txt"
                        "${Complex_BINARY_DIR}/Executable/postbuild2.txt")

The command to do generate prelink.txt was using PRE_BUILD instead of
PRE_LINK.

If you fix this, what do the dashboards tell you?  I'm going to try it
locally as well.

James


On Wed, Dec 12, 2012 at 11:38 AM, Brad King <brad.king at kitware.com> wrote:

> On 12/12/2012 01:09 PM, James Bigler wrote:
> > not PRE_LINK.  I'm seeing problems with PRE_LINK not working in VS 2010,
> > so I wanted to see if it was actually being tested.
>
> It appears PRE_LINK is not tested.  However, the implementation of all
> three looks the same in one place in the VS10 generator:
>
>
> http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmVisualStudio10TargetGenerator.cxx;hb=v2.8.10.2#l1617
>
> -Brad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20121212/12c1a89f/attachment.html>


More information about the cmake-developers mailing list