diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-09-25 14:06:55 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-09-25 14:06:55 +0000 |
commit | 19c450af62ee4c352c4aa7dd428ae01526c58501 (patch) | |
tree | 6c9b95da25b1c31742a0db122b0ceeabccedcda7 /CMakeLists.txt | |
parent | 9660ebb398cc3e9202a24087ad46290c3de29c7c (diff) | |
download | external_llvm-19c450af62ee4c352c4aa7dd428ae01526c58501.zip external_llvm-19c450af62ee4c352c4aa7dd428ae01526c58501.tar.gz external_llvm-19c450af62ee4c352c4aa7dd428ae01526c58501.tar.bz2 |
Set the minimal stack size with msvc when using cmake >= 2.8.11.
This makes sure we get the same behavior with all supported cmake versions. Once
we support only versions >= 2.8.11 we can experiment with other values or just
setting it for some binaries.
Patch by Greg Bedwell.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191372 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ef8906c..3218e84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,15 @@ if ( LLVM_USE_FOLDERS ) set_property(GLOBAL PROPERTY USE_FOLDERS ON) endif() +if(MSVC AND NOT (${CMAKE_VERSION} VERSION_LESS 2.8.11)) + # set stack reserved size to ~10MB + # CMake previously automatically set this value for MSVC builds, but the + # behavior was changed in CMake 2.8.11 (Issue 12437) to use the MSVC default + # value (1 MB) which is not enough for us in tasks such as parsing recursive + # C++ templates in Clang. + set(CMAKE_CXX_STACK_SIZE "10000000") +endif() + include(VersionFromVCS) option(LLVM_APPEND_VC_REV |