[CMake] Setting the compiler
Juan Sanchez
Juan.Sanchez at amd.com
Sun Jul 29 14:23:46 EDT 2007
Hi Bill,
Thanks to you and everyone else for their responses. I also appreciate
the clarification on how the dependency checking works. Currently our
release system for each project requires that everything is hardcoded
into the Makefile, and that the whole project can be invoked by the
release system simply calling make.
It would be necessary to change the release system to accommodate cmake,
but I am hoping that this doesn't cause too much of an issue for the
other developers.
One question:
Is it possible for cmake to generate Makefiles by a different name than
"Makefile"? Then it would be possible for developer's existing
Makefiles to not get clobbered by cmake. Gnu make could then be called
with the -f specification for the Makefile name.
Thanks,
Juan
Bill Hoffman wrote:
> Juan Sanchez wrote:
>>> 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.
>>
>>
> Sure, but they must have to set the compiler for the makefile at some
> point either by environment,
> PATH, or hard coding in the gnu makefile. Once run cmake will cache
> all the information needed
> to build. So, the environment is only needed the first time around.
>> 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.
>>
> If they are in separate build directories they would not affect each
> other at all. cd 32bit; make
> cd 64bit; make.
>> 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?
>>
> No, they are not. CMake will potentially have extra depends that are
> not actually being used
> for the build. However, cmake's scanner is fast, and it is better to
> have extra depends than
> not enough. Having a full CPP could be done, but in practice it really
> has not caused problems
> even for very large software systems.
>
> -Bill
>
>
>
--
Juan Sanchez
Juan.Sanchez at amd.com
800-538-8450 Ext. 54395
512-602-4395
More information about the CMake
mailing list