aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Davis <keith.davis@arm.com>2021-05-31 11:22:35 +0100
committerKeith Davis <keith.davis@arm.com>2021-05-31 11:22:35 +0100
commitb8942bf1a49b8ec710fafd7915dd9c8fee62230d (patch)
tree0fcd3a2b8cd2799f51cf9fadcbadbf5ad8562f3b
parent41e764c0f0984f6f5b890f857033372e4476dd97 (diff)
downloadarmnn-b8942bf1a49b8ec710fafd7915dd9c8fee62230d.tar.gz
MLCE-500 Link zlib library to ArmNN
* Bug fix: link only on Android Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I9f13da41bea9ffc72b75f21cef4faf1902341100
-rw-r--r--cmake/GlobalConfig.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/GlobalConfig.cmake b/cmake/GlobalConfig.cmake
index 0a9341f8ab..8757723c10 100644
--- a/cmake/GlobalConfig.cmake
+++ b/cmake/GlobalConfig.cmake
@@ -66,7 +66,6 @@ endif()
# Compiler flags that are always set
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lz") # Necessary for when building with ACL set with compressed kernels
if(COMPILER_IS_GNU_LIKE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra -Werror -Wold-style-cast -Wno-missing-braces -Wconversion -Wsign-conversion")
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
@@ -75,8 +74,9 @@ elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
add_definitions(-DNO_STRICT=1)
endif()
if("${CMAKE_SYSTEM_NAME}" STREQUAL Android)
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -llog")
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -llog")
+ # -lz is necessary for when building with ACL set with compressed kernels
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -llog -lz")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -llog -lz")
endif()
# Compiler flags for Release builds