<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Trevor Kellaway wrote:
<blockquote
cite="mid6959B9DDF61D864B9F16D6935704F3EB373EAC@asl3.asl.lan"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=us-ascii">
<title>How to make executable depend on pre-existing control file?</title>
<p> Hi, </p>
<p> I'm try to get my link to depend on a pre-existing file that
contains linker segment information "link.prm". </p>
<p> I thought that by just adding this to the executable dependency
list this should work: </p>
<p> ADD_EXECUTABLE (${THIS_APP} ${THIS_SRC}
${CMAKE_SOURCE_DIR}/link.prm) </p>
<p> Alas, it seems to have no effect. The generated "build.make"
contains no dependency references for "link.prm". </p>
<p> Is this the correct way of doing this?</p>
</blockquote>
<br>
ADD_EXECUTABLE isn't taking a dependency list. It's taking a list of
source files used to build. If link.prm has no relevance to the build,
I'll wager that it is discarded. I bet you'll need:<br>
<br>
ADD_EXECUTABLE (${THIS_APP} ${THIS_SRC})<br>
ADD_CUSTOM_TARGET(link_prm DEPENDS ${CMAKE_SOURCE_DIR}/link.prm)<br>
ADD_DEPENDENCIES(${THIS_APP} link_prm)<br>
<br>
<br>
Cheers,<br>
Brandon Van Every<br>
<br>
</body>
</html>