summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmDSPWriter.cxx11
-rw-r--r--Templates/CMakeWindowsSystemConfig.cmake4
2 files changed, 13 insertions, 2 deletions
diff --git a/Source/cmDSPWriter.cxx b/Source/cmDSPWriter.cxx
index c3ad622..d981e42 100644
--- a/Source/cmDSPWriter.cxx
+++ b/Source/cmDSPWriter.cxx
@@ -653,8 +653,15 @@ void cmDSPWriter::WriteDSPHeader(std::ostream& fout, const char *libName,
}
}
}
- libOptions += " /STACK:10000000 ";
- libMultiLineOptions += "# ADD LINK32 /STACK:10000000 \n";
+ std::string extraLinkOptions =
+ m_Makefile->GetDefinition("CMAKE_EXTRA_LINK_FLAGS");
+ if(extraLinkOptions.size())
+ {
+ libOptions += extraLinkOptions;
+ libMultiLineOptions += "# ADD LINK32 ";
+ libMultiLineOptions += extraLinkOptions;
+ libMultiLineOptions += " \n";
+ }
// are there any custom rules on the target itself
// only if the target is a lib or exe
diff --git a/Templates/CMakeWindowsSystemConfig.cmake b/Templates/CMakeWindowsSystemConfig.cmake
index ec093dd..07e0c88 100644
--- a/Templates/CMakeWindowsSystemConfig.cmake
+++ b/Templates/CMakeWindowsSystemConfig.cmake
@@ -19,6 +19,9 @@ SET (CMAKE_CXX_FLAGS_DEBUG "/MDd /Zi /Od /GZ" CACHE STRING
SET (CMAKE_CXX_FLAGS "/W3 /Zm1000 /GX /GR" CACHE STRING
"Flags used by the compiler during all build types, /GX /GR are for exceptions and rtti in VC++, /Zm1000 increases the compiler's memory allocation to support ANSI C++/stdlib")
+SET (CMAKE_EXTRA_LINK_FLAGS "/STACK:10000000" CACHE STRING
+ "Extra flags added to the link line for creation of exe and dlls.")
+
SET (CMAKE_USE_WIN32_THREADS 1 CACHE BOOL
"Use the win32 thread library")
@@ -47,6 +50,7 @@ CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_DEBUG
CMAKE_USE_WIN32_THREADS
CMAKE_MAKE_PROGRAM
+CMAKE_EXTRA_LINK_FLAGS
)