summaryrefslogtreecommitdiffstats
path: root/Source/cmCoreTryCompile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-01-26 20:22:27 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-01-26 20:22:27 (GMT)
commit5ec9f6f60901c3ed4b8668e8cd34f71b01023631 (patch)
tree4abb6f3b379198d25a5729ac106e28b29a5246ef /Source/cmCoreTryCompile.cxx
parent41147fcf485113756566d04505f12a3905c1b7dd (diff)
parent699a7255847ba8b348ba63a2244b5b57b328261c (diff)
downloadCMake-5ec9f6f60901c3ed4b8668e8cd34f71b01023631.zip
CMake-5ec9f6f60901c3ed4b8668e8cd34f71b01023631.tar.gz
CMake-5ec9f6f60901c3ed4b8668e8cd34f71b01023631.tar.bz2
Merge topic 'fix-try_compile-source-language-issue-11731'
699a725 Use shortest extension to verify try_compile language (#11731)
Diffstat (limited to 'Source/cmCoreTryCompile.cxx')
-rw-r--r--Source/cmCoreTryCompile.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index f4df4c3..25b3216 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/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");