<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Maybe I didn't explain the issue well. I could have two cases:<br>
1 - When MyTool is launched it fails (it returns an exit code != 0)<br>
2 - The building of MyTool fails, so there is no new exec file to invoke<br>
In both two cases, in order to avoid to produce some odd programs, I
need that also TARGET_NAME1 and TARGET_NAME2 stop their building too.<br>
I hope I explained it better now.<br>
Andrea<br>
<br>
Tyler ha scritto:
<blockquote cite="midBANLkTikg+rxypcYnb1O1Wihbtxk_+REqUg@mail.gmail.com"
type="cite">
<pre wrap="">This looks reasonably correct to me (although PreBuildCommands has no
explicit dependency on the MyTool target; I'm not sure if the fact
that you're calling MyTool as part of your custom target will cause
CMake to create an implicit dependency from PreBuildCommands to
MyTool).
What is the problem that you're seeing? Can you show us some output
from a build that demonstrates this problem?
The next step is to create a minimum case that reproduces the problem
you're seeing.
tyler
On Wed, May 18, 2011 at 2:27 AM, Andrea Galeazzi <a class="moz-txt-link-rfc2396E" href="mailto:Galeazzi@korg.it"><Galeazzi@korg.it></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I've multiple executable targets depending on a custom target that invokes
another executable target:
add_executable(MyTool ${MyTool_SOURCES})
add_custom_target(PreBuildCommands ALL COMMAND "java" "-jar"
"../BuildNumberUpdater.jar"
${GENERATED_SOURCES}
COMMAND MyTool
DEPENDS ${SOURCES} ${LIB_TO_LINK}
COMMENT "Changing the build number")
add_executable(${TARGET_NAME1} ${SOURCES} ${GENERATED_SOURCES})
add_dependencies(${TARGET_NAME1} MyTool PreBuildCommands)
add_executable(${TARGET_NAME2} ${SOURCES} ${GENERATED_SOURCES})
add_dependencies(${TARGET_NAME2} MyTool PreBuildCommands)
I'd like, or better I need, that when the building of MyTool fails the other
dependent targets won't build or fails their build too.
How could I achieve that?
_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at
<a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the CMake FAQ at:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a>
</pre>
</blockquote>
<pre wrap=""><!---->_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the CMake FAQ at: <a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a>
__________ Informazioni da ESET NOD32 Antivirus, versione del database delle firme digitali 6132 (20110518) __________
Il messaggio è stato controllato da ESET NOD32 Antivirus.
<a class="moz-txt-link-abbreviated" href="http://www.nod32.it">www.nod32.it</a>
</pre>
</blockquote>
<br>
</body>
</html>