Browse Source

Merge topic 'fix-try_compile-source-language-issue-11731'

699a725 Use shortest extension to verify try_compile language (#11731)
Brad King 15 years ago
parent
commit
5ec9f6f609
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/cmCoreTryCompile.cxx

+ 1 - 1
Source/cmCoreTryCompile.cxx

@@ -169,7 +169,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
       }
 
     std::string source = argv[2];
-    std::string ext = cmSystemTools::GetFilenameExtension(source);
+    std::string ext = cmSystemTools::GetFilenameLastExtension(source);
     const char* lang =(this->Makefile->GetCMakeInstance()->GetGlobalGenerator()
                         ->GetLanguageFromExtension(ext.c_str()));
     const char* def = this->Makefile->GetDefinition("CMAKE_MODULE_PATH");