[Cmake-commits] CMake branch, next, updated. v3.5.0-rc2-151-g10fd480
Brad King
brad.king at kitware.com
Tue Feb 16 10:36:16 EST 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 10fd48038dd5d804caf41a3f169f1dc54595874c (commit)
via 184da3f4f6ab74d2024455f8684286b2dbaa6a6e (commit)
from b60c67cc1f225fcdd270d2ed298b1b8b1b9f0697 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=10fd48038dd5d804caf41a3f169f1dc54595874c
commit 10fd48038dd5d804caf41a3f169f1dc54595874c
Merge: b60c67c 184da3f
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Feb 16 10:36:16 2016 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Feb 16 10:36:16 2016 -0500
Merge topic 'CodeBlocks-more-compilers' into next
184da3f4 CodeBlocks: improve support for different compilers
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=184da3f4f6ab74d2024455f8684286b2dbaa6a6e
commit 184da3f4f6ab74d2024455f8684286b2dbaa6a6e
Author: Melven Roehrig-Zoellner <Melven.Roehrig-Zoellner at DLR.de>
AuthorDate: Fri Feb 12 00:00:10 2016 +0100
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Feb 16 10:18:38 2016 -0500
CodeBlocks: improve support for different compilers
More elaborate selection of the `compiler` tag in the generated
CodeBlocks project file:
* Fortran language support
* support for several of the predefined compilers recognized by
CodeBlocks (16.01)
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 9348ef2..026958a 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -684,18 +684,38 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
std::string cmExtraCodeBlocksGenerator::GetCBCompilerId(const cmMakefile* mf)
{
// figure out which language to use
- // for now care only for C and C++
- std::string compilerIdVar = "CMAKE_CXX_COMPILER_ID";
- if (this->GlobalGenerator->GetLanguageEnabled("CXX") == false)
+ // for now care only for C, C++, and Fortran
+
+ // projects with C/C++ and Fortran are handled as C/C++ projects
+ bool pureFortran = false;
+ std::string compilerIdVar;
+ if (this->GlobalGenerator->GetLanguageEnabled("CXX") == true)
+ {
+ compilerIdVar = "CMAKE_CXX_COMPILER_ID";
+ }
+ else if (this->GlobalGenerator->GetLanguageEnabled("C") == true)
{
compilerIdVar = "CMAKE_C_COMPILER_ID";
}
+ else if (this->GlobalGenerator->GetLanguageEnabled("Fortran") == true)
+ {
+ compilerIdVar = "CMAKE_Fortran_COMPILER_ID";
+ pureFortran = true;
+ }
+
std::string compilerId = mf->GetSafeDefinition(compilerIdVar);
std::string compiler = "gcc"; // default to gcc
if (compilerId == "MSVC")
{
- compiler = "msvc8";
+ if( mf->IsDefinitionSet("MSVC10") == true )
+ {
+ compiler = "msvc10";
+ }
+ else
+ {
+ compiler = "msvc8";
+ }
}
else if (compilerId == "Borland")
{
@@ -707,15 +727,44 @@ std::string cmExtraCodeBlocksGenerator::GetCBCompilerId(const cmMakefile* mf)
}
else if (compilerId == "Intel")
{
- compiler = "icc";
+ if (pureFortran && mf->IsDefinitionSet("WIN32"))
+ {
+ compiler = "ifcwin"; // Intel Fortran for Windows (known by cbFortran)
+ }
+ else
+ {
+ compiler = "icc";
+ }
}
else if (compilerId == "Watcom" || compilerId == "OpenWatcom")
{
compiler = "ow";
}
+ else if (compilerId == "Clang")
+ {
+ compiler = "clang";
+ }
+ else if (compilerId == "PGI")
+ {
+ if (pureFortran)
+ {
+ compiler = "pgifortran";
+ }
+ else
+ {
+ compiler = "pgi"; // does not exist as default in CodeBlocks 16.01
+ }
+ }
else if (compilerId == "GNU")
{
- compiler = "gcc";
+ if (pureFortran)
+ {
+ compiler = "gfortran";
+ }
+ else
+ {
+ compiler = "gcc";
+ }
}
return compiler;
}
-----------------------------------------------------------------------
Summary of changes:
Source/cmExtraCodeBlocksGenerator.cxx | 61 +++++++++++++++++++++++++++++----
1 file changed, 55 insertions(+), 6 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list