From 1af684c507dd5b2c7ab7ffe89d21799320e3d9c6 Mon Sep 17 00:00:00 2001 From: Przemek Tredak Date: Fri, 17 Apr 2020 09:07:55 -0700 Subject: [PATCH] Trying mcmodel=medium to fix the failure in CMake static build --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ca92ff19a93..c0a0d53ee314 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -176,6 +176,9 @@ else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3") endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS}") + if(USE_CUDA) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mcmodel=medium") + endif() endif() if(NOT mxnet_LINKER_LIBS)