Explorar o código

Default to gcc as the compiler.

The compiler id is checked for C++ and C, if there is not one
of those available, then just default to gcc.  This makes it
work with Fortran, or None projects.
Bill Hoffman %!s(int64=15) %!d(string=hai) anos
pai
achega
ebdda6ed13
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      Source/cmExtraCodeBlocksGenerator.cxx

+ 2 - 2
Source/cmExtraCodeBlocksGenerator.cxx

@@ -630,8 +630,8 @@ std::string cmExtraCodeBlocksGenerator::GetCBCompilerId(const cmMakefile* mf)
 
 
   std::string hostSystemName = mf->GetSafeDefinition("CMAKE_HOST_SYSTEM_NAME");
   std::string hostSystemName = mf->GetSafeDefinition("CMAKE_HOST_SYSTEM_NAME");
   std::string systemName = mf->GetSafeDefinition("CMAKE_SYSTEM_NAME");
   std::string systemName = mf->GetSafeDefinition("CMAKE_SYSTEM_NAME");
-  std::string compilerId = mf->GetRequiredDefinition(compilerIdVar.c_str());
-  std::string compiler = "gcc";
+  std::string compilerId = mf->GetSafeDefinition(compilerIdVar.c_str());
+  std::string compiler = "gcc";  // default to gcc
   if (compilerId == "MSVC")
   if (compilerId == "MSVC")
     {
     {
     compiler = "msvc8";
     compiler = "msvc8";