<div class="gmail_quote">On Mon, Dec 12, 2011 at 1:31 PM, Michael Wild <span dir="ltr"><<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 12/12/2011 08:28 PM, Robert Dailey wrote:<br>
> Hi,<br>
><br>
> I'm creating a custom target in CMake 2.8.7 RC1 and running it in Visual<br>
> Studio 2008. I set an environment variable called BUILDBIN in the custom<br>
> command but for some reason my scripts that I invoke are not picking up<br>
> that environment variable. Am I doing something wrong? These custom<br>
> commands are starting to get pretty complex and I'm wondering if I<br>
> should pull out the logic into a batch file. What do you guys think?<br>
><br>
</div>[snip long code]<br>
<br>
Definitely batch file or, preferably CMake script. In CMake scripts,<br>
just assign to the ENV{VAR} variable and use execute_process().</blockquote><div><br></div><div>CMake script would imply that it runs as part of the configuration process. I can't build an installer until all binaries are compiled and linked, so it needs to be a target in visual studio.</div>
<div><br></div><div>Problem with pushing this out to a batch file is that I only have 9 parameters maximum that I can use to pass CMake variables. I need more than 9, as you can see from the number of variables I use in the script I sent you. I can't think of a good design for this. Not to mention I hate batch files.</div>
<div><br></div><div>But moving it out to a batch file will guarantee that I can setup the environment properly (set environment variables) and also when users change the way the installer works, CMake won't need to be reconfigured, which is a huge plus.</div>
<div><br></div><div>Any advice here on how I could setup my batch file to accept more than 9 parameters from CMake?</div></div>