On 07/25/2012 04:57 PM, J Decker wrote:
> Is there a super simple way to get the current build command for say
> exectuable, string(replace) it, and then execute it in a custom
> target?

There is no hook into the final generation.  You can hack the
rule variable to add options at the end, though this is not
officially supported:

 set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE} liblast.a")

> that is the behavior I observe, but, I don't understand why a library
> would be inserted in the middle of a set of libraries...

Static libraries do not themselves link.  The target_link_libraies
calls for them only specify their dependencies.  Those dependencies
are normally only other libraries, not flags.  The final link line
is computed only on targets that really link.  The method used to
compute it is documented in comments in the source here:

 
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmComputeLinkDepends.cxx;hb=v2.8.8#l25

-Brad
--

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

Reply via email to