diff --git a/CMakeLists.txt b/CMakeLists.txt index c90d4ec1b7699c718a6036cd09f6a3c15a068070..b9d072241c409850ac4b4fa97149fb56bd9c16ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,9 @@ cmake_minimum_required(VERSION 3.6) -option(USE_OPENMP "openmp support" ON) -option(DEBUGING "enable debug mode" ON) +option(USE_OPENMP "openmp support" OFF) +option(DEBUGING "enable debug mode" OFF) option(USE_EXCEPTION "use std exception" ON) +option(SYMBOL_HIDDEN "symbol hidden" OFF) # on when use jni or ios io option(LOG_PROFILE "log profile" OFF) # select the platform to build option(CPU "armv7 with neon" ON) @@ -10,6 +11,7 @@ option(GPU_MALI "mali gpu" OFF) option(GPU_CL "opencl gpu" ON) option(FPGA "fpga" OFF) + project(paddle-mobile) file(GLOB_RECURSE PADDLE_MOBILE_CC src/*.cc src/*.cpp src/*.c src/*.mm) @@ -30,10 +32,10 @@ if(DEBUGING) message(STATUS "debugging mode") add_definitions(-DPADDLE_MOBILE_DEBUG) else() - if(FPGA) - else() - add_definitions(-fvisibility=hidden -fvisibility-inlines-hidden) - endif() +endif() + +if(SYMBOL_HIDDEN) + add_definitions(-fvisibility=hidden -fvisibility-inlines-hidden) endif() if(USE_EXCEPTION)