aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/EthCompilerSettings.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/EthCompilerSettings.cmake')
-rw-r--r--cmake/EthCompilerSettings.cmake13
1 files changed, 10 insertions, 3 deletions
diff --git a/cmake/EthCompilerSettings.cmake b/cmake/EthCompilerSettings.cmake
index 6d4dadeb..7199f537 100644
--- a/cmake/EthCompilerSettings.cmake
+++ b/cmake/EthCompilerSettings.cmake
@@ -93,10 +93,15 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
# testing on at least OS X and Ubuntu.
add_compile_options(-Wno-unused-function)
add_compile_options(-Wno-dangling-else)
-
+
+ if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
+ # Set stack size to 16MB - by default Apple's clang defines a stack size of 8MB, some tests require more.
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-stack_size -Wl,0x1000000")
+ endif()
+
# Some Linux-specific Clang settings. We don't want these for OS X.
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
-
+
# TODO - Is this even necessary? Why?
# See http://stackoverflow.com/questions/19774778/when-is-it-necessary-to-use-use-the-flag-stdlib-libstdc.
add_compile_options(-stdlib=libstdc++)
@@ -115,7 +120,7 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
endif()
if (EMSCRIPTEN)
- # Do emit a separate memory initialiser file
+ # Do not emit a separate memory initialiser file
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --memory-init-file 0")
# Leave only exported symbols as public and agressively remove others
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdata-sections -ffunction-sections -Wl,--gc-sections -fvisibility=hidden")
@@ -133,6 +138,8 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s ALLOW_MEMORY_GROWTH=1")
# Disable eval()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s NO_DYNAMIC_EXECUTION=1")
+ # Disable greedy exception catcher
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s NODEJS_CATCH_EXIT=0")
add_definitions(-DETH_EMSCRIPTEN=1)
endif()
endif()