[cmake-developers] FW: FW: Initial Attempt at Green Hill MULTI IDE Generator Support

Brad King brad.king at kitware.com
Mon Mar 30 09:56:05 EDT 2015


On 03/30/2015 12:49 AM, Geoffrey Viola wrote:
> cmGlobalGhsMultiGenerator::FindMakeProgram uses the definition,
> "GHS_COMP_ROOT," to find gbuild.

Thanks.  However, I don't think that approach will work.  At the
point where GenerateBuildCommand is called in the case that is
failing, EnableLanguage has never been run because it is not a
real configuration.  One giveaway of this problem is this hunk:

> -    this->SelectMakeProgram(makeProgram, this->GetGhsBuildCommand())
> -    );
> +    this->SelectMakeProgram(makeProgram, this->GhsBuildCommand)
> +  );

which I presume had to be done because no "mf" is available.
However, at this point in the code nothing will have populated
the GhsBuildCommand member.  That's why it needs the call.

Instead, please look at using GetCompRoot in FindGhsBuildCommand.

> also support for the rest of the standard CMAKE_BUILD_TYPE values

For all other generators and toolchains, the place we put the
config-specific flags is in the CMAKE_<LANG>_FLAGS_<CONFIG>
cache entries.  These values are typically initialized in the

 Modules/Compiler/<id>-<lang>.cmake

modules.  In this case, I think it would be:

 Modules/Compiler/GHS-C.cmake
 Modules/Compiler/GHS-CXX.cmake

modules.  See Modules/Compiler/Intel-*.cmake for an example.
Then make sure the generator reads the flag values for the
current configuration and uses them.

Thanks,
-Brad



More information about the cmake-developers mailing list