mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
CodeBlocks: add option for the CB compiler ID
CodeBlocks uses his own compiler ID string which may differ from CMAKE_<LANG>_COMPILER_ID. In particular CodeBlocks supports a large number of different compiler configurations (with different IDs) This commit adds a cache variable "CMAKE_CODEBLOCKS_COMPILER_ID", so the user might adjust it when needed.
This commit is contained in:
committed by
Brad King
parent
85ae0ba796
commit
e04f1d1b47
@@ -648,6 +648,13 @@ void cmExtraCodeBlocksGenerator::AppendTarget(
|
||||
// Translate the cmake compiler id into the CodeBlocks compiler id
|
||||
std::string cmExtraCodeBlocksGenerator::GetCBCompilerId(const cmMakefile* mf)
|
||||
{
|
||||
// allow the user to overwrite the detected compiler
|
||||
std::string userCompiler =
|
||||
mf->GetSafeDefinition("CMAKE_CODEBLOCKS_COMPILER_ID");
|
||||
if (!userCompiler.empty()) {
|
||||
return userCompiler;
|
||||
}
|
||||
|
||||
// figure out which language to use
|
||||
// for now care only for C, C++, and Fortran
|
||||
|
||||
|
||||
Reference in New Issue
Block a user