summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2003-12-11 20:38:00 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2003-12-11 20:38:00 (GMT)
commitadd1f25f58d6af6b3da4f859be775ee4a0defcbf (patch)
tree96606004f22e2a5470ebeeb6c373769639b043de
parentdf32e28b1d4c9750eeeddf8035ecc3d543edd6cc (diff)
downloadCMake-add1f25f58d6af6b3da4f859be775ee4a0defcbf.zip
CMake-add1f25f58d6af6b3da4f859be775ee4a0defcbf.tar.gz
CMake-add1f25f58d6af6b3da4f859be775ee4a0defcbf.tar.bz2
BUG:427 trycompile target must be exe
-rw-r--r--Source/cmGlobalGenerator.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 0911422..ec0de18 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -483,7 +483,13 @@ int cmGlobalGenerator::TryCompile(const char *, const char *bindir,
makeCommand += " ";
makeCommand += target;
#if defined(_WIN32) || defined(__CYGWIN__)
- makeCommand += ".exe";
+ std::string tmp = target;
+ // if the target does not already end in . something
+ // then assume .exe
+ if(tmp.size() < 4 || tmp[tmp.size()-4] != '.')
+ {
+ makeCommand += ".exe";
+ }
#endif // WIN32
}
else