summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraCodeBlocksGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-29 13:25:44 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-11-29 13:32:26 (GMT)
commitc07b18d8835fbc4ddc0364f6f3531cc515f309fc (patch)
tree41a259caec80fc76547b6d66825368dfa7e6cb6e /Source/cmExtraCodeBlocksGenerator.cxx
parent71c28bddba25847f65cfebefe884d8e88eedc1af (diff)
parente04f1d1b47f395cd702574041aa17e52e71499d8 (diff)
downloadCMake-c07b18d8835fbc4ddc0364f6f3531cc515f309fc.zip
CMake-c07b18d8835fbc4ddc0364f6f3531cc515f309fc.tar.gz
CMake-c07b18d8835fbc4ddc0364f6f3531cc515f309fc.tar.bz2
Merge topic 'CodeBlocks-custom-compiler-id'
e04f1d1b CodeBlocks: add option for the CB compiler ID Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1512
Diffstat (limited to 'Source/cmExtraCodeBlocksGenerator.cxx')
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 76fc8f1..edce330 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -642,6 +642,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