[CMake] Different configurations with Visual Studio

Mike McQuaid mike at mikemcquaid.com
Thu Aug 26 04:59:08 EDT 2010


On 26 August 2010 10:17, Mark Van Peteghem <markvp at gmail.com> wrote:
> We do have different build folders for each compiler / ide, but I mean
> 'build folder' as the folder where the object files and executable ends. We
> just want one project file with different platform solutions, so we don't
> have to reload the project file when we want to switch. Having two project
> files in the same solution also is not an option, because the source files
> and many settings are the same. Besides, this is a big solution file with
> over 50 project files, so doubling that would make things a lot harder.
>
> I don't really understand why some find this an awkward way of doing things,
> it is simply convenient to have both platforms in one project file, e.g. it
> is easy to build everything at once. I don't see any drawbacks.

In that case, use various if/else statements depending on your
platform and just use a different build directory for each platform,
then each will have a different build folder but also a different
CMake cache so the variables will be parsed differently.
-- 
Cheers,
Mike McQuaid
http://mikemcquaid.com/


More information about the CMake mailing list