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

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to