From 4b8767324d7a8eb125071aa3bd4614c905f66796 Mon Sep 17 00:00:00 2001 From: liuruilong Date: Wed, 31 Oct 2018 22:42:52 +0800 Subject: [PATCH] update cmake --- CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c90d4ec1b7..b9d072241c 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) -- GitLab