summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeGenericSystem.cmake1
-rw-r--r--Modules/Platform/Windows-g77.cmake1
-rw-r--r--Modules/Platform/Windows-gcc.cmake1
-rw-r--r--Modules/Platform/Windows.cmake1
-rw-r--r--Source/cmTarget.cxx5
5 files changed, 5 insertions, 4 deletions
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake
index c8bc457..970d777 100644
--- a/Modules/CMakeGenericSystem.cmake
+++ b/Modules/CMakeGenericSystem.cmake
@@ -4,6 +4,7 @@ SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
+SET(CMAKE_EXECUTABLE_SUFFIX "") # .exe
SET(CMAKE_DL_LIBS "-ldl")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
diff --git a/Modules/Platform/Windows-g77.cmake b/Modules/Platform/Windows-g77.cmake
index 7ab664b..193b925 100644
--- a/Modules/Platform/Windows-g77.cmake
+++ b/Modules/Platform/Windows-g77.cmake
@@ -3,6 +3,7 @@ SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # .so
+SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
SET(CMAKE_SHARED_MODULE_PREFIX "lib") # lib
SET(CMAKE_SHARED_MODULE_SUFFIX ".dll") # .so
SET(CMAKE_DL_LIBS "")
diff --git a/Modules/Platform/Windows-gcc.cmake b/Modules/Platform/Windows-gcc.cmake
index 3fb8186..949cc56 100644
--- a/Modules/Platform/Windows-gcc.cmake
+++ b/Modules/Platform/Windows-gcc.cmake
@@ -5,6 +5,7 @@ SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # .so
SET(CMAKE_SHARED_MODULE_PREFIX "lib") # lib
SET(CMAKE_SHARED_MODULE_SUFFIX ".dll") # .so
+SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
SET(CMAKE_DL_LIBS "")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "") # -pic
diff --git a/Modules/Platform/Windows.cmake b/Modules/Platform/Windows.cmake
index 29198b5..163d3f6 100644
--- a/Modules/Platform/Windows.cmake
+++ b/Modules/Platform/Windows.cmake
@@ -2,6 +2,7 @@ SET(CMAKE_STATIC_LIBRARY_PREFIX "")
SET(CMAKE_STATIC_LIBRARY_SUFFIX ".lib")
SET(CMAKE_SHARED_LIBRARY_PREFIX "") # lib
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # .so
+SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
SET(CMAKE_LINK_LIBRARY_SUFFIX ".lib")
SET(CMAKE_DL_LIBS "")
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 4e2b01c..61f5482 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -914,6 +914,7 @@ const char* cmTarget::GetSuffixVariableInternal(TargetType type)
case cmTarget::MODULE_LIBRARY:
return "CMAKE_SHARED_MODULE_SUFFIX";
case cmTarget::EXECUTABLE:
+ return "CMAKE_EXECUTABLE_SUFFIX";
case cmTarget::UTILITY:
case cmTarget::INSTALL_FILES:
case cmTarget::INSTALL_PROGRAMS:
@@ -956,10 +957,6 @@ std::string cmTarget::GetFullNameInternal(TargetType type)
{
const char* targetPrefix = this->GetProperty("PREFIX");
const char* targetSuffix = this->GetProperty("SUFFIX");
- if(!targetSuffix && type == cmTarget::EXECUTABLE)
- {
- targetSuffix = cmSystemTools::GetExecutableExtension();
- }
const char* prefixVar = this->GetPrefixVariableInternal(type);
const char* suffixVar = this->GetSuffixVariableInternal(type);
const char* ll =