[CMake] Converting a VS Build to CMake/Problems with Post-Build steps, questions

Anteru Anteru at shelter13.net
Fri Feb 29 12:48:23 EST 2008


david.karr at l-3com.com schrieb:
> Caveat: The following is based on a much older version of CMake which
> I've been using for the same project for about five years.
Just out of curiosity, how much maintenance work was required for those 
project files over the five years? Switching from a VS to a new one 
takes some while, and I wonder how good CMake's forward/backward 
compatibility is :)

> Actually, we use a CMake MACRO definition to invoke this and a bunch of
> other commands on each library and executable we build, so we have, for
> example, "${exe_file_name}.exe" instead of "my_executable" for an
> executable output, where "exe_file_name" is a parameter of the MACRO.
> But that's because we build many libraries and executables, and it would
> have been quite tedious to have to maintain all the commands for each
> one independently.

So you are hard-wiring all the executable names per config? Doesn't this 
make the stuff extra hard for the developers if they have to open a 
different config for debug and release? I like the convenience of having 
both available in a single config, as I can easily switch between 
debug/release then (I'm using VS).

I just really need those different names, otherwise a debug lib could 
easily end up in a release ... plus, as noted, I'm actually trying to 
put both into the same folder to avoid copying around data :)

> of that.  That's why I have about four or five different scripts to
> invoke CMake with different sets of variables defined depending on what
> kind of build I want to make.

Unfortunately, this is exactly why I'm trying over to switch to CMake, 
as I want to get rid of pre- & postprocessing scripts as much as 
possible. For instance, I could get already rid of my custom install 
script with the INSTALL command, which is really great.

Thanks for the insights into your approach, if there is indeed no better 
solution I'll probably have to resort to something similar, I'm just 
hoping that there is indeed a solution that gives me all the comfort of 
the current VS build.

Cheers,
   Anteru


More information about the CMake mailing list