[CMake] Setting the compiler

Juan Sanchez Juan.Sanchez at amd.com
Fri Jul 27 16:28:38 EDT 2007


>>
> So, what is the current build system and how does it work?
>

Everyone writes their own.  Most of the projects are for a single
developer.  Typically, they use GNU make.  I've been asked to
investigate a common build system.  Of course, everyone has their own
opinion about what a build system should be.

Of the build systems I've investigated, CMake is the most attractive.
Except for the index, I think that the book you've written is excellent.

The only thing I'd really like clarification on is:

Would changing the compiler (64bit to 32bit) using environment variables
trigger massive recompilation (dependency hell) when changing the
setting back from (32bit to 64bit)?  Note that 32bit and 64bit would
have separate build directories.

Is the dependency checking that cmake uses as effective as "g++ -M"
(CPP)  in determining the dependencies?  Are the "#include" statements
in conditional macros tests honored when determining the dependencies?
Are the macro defines used in the compilation also passed along to the
dependency checker for each build variant?

Thanks,

Juan

Bill Hoffman wrote:
> Juan Sanchez wrote:
>> Hi Bill,
>>
>> We are going to require the developer to run a specific compiler for a
>> 32 bit build and a different one for the 64 bit build.  That is the
>> preference for being able to set it in CMakeLists.txt, and just having
>> it work.  Each developer is responsible for releasing the code on a
>> frequent basis, so everything has to be locked down.  They also need to
>> be able to test their changes, before source check in, for both builds.
>>
>> Requiring an environment variable is  an issue that would cause someone
>> to complain.  Making them run a build script for each platform would
>> also cause them to complain.  If any of this triggers a massive
>> recompilation of the source files, that is another reason for them to
>> complain.
>>
>> I like Cmake, and I really hope we are able to deploy it in our group.
>> My worry is that people aren't logical, and issues like the ones I
>> mention may be showstoppers for them, even if the workaround requires
>> minimal extra effort.
>>
>> Regards,
>>
>> Juan
>>   
> So, what is the current build system and how does it work?
> 
> 
> 


-- 
Juan Sanchez
Juan.Sanchez at amd.com
800-538-8450 Ext. 54395
512-602-4395




More information about the CMake mailing list