summaryrefslogtreecommitdiff
path: root/infra/nnfw/cmake/buildtool/config/config_linux.cmake
blob: a17bbb2bd443cbe465dfae65777a92aa28756673 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#
# linux common compile options
#

# test-coverage build flag
if("${COVERAGE_BUILD}" STREQUAL "1")
  set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE ON)
  set(FLAGS_COMMON "${FLAGS_COMMON} -fprofile-arcs -ftest-coverage")
  set(CMAKE_EXE_LINKER_FLAGS
    "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
  set(CMAKE_C_FLAGS_DEBUG     "-O -g -DDEBUG")
  set(CMAKE_CXX_FLAGS_DEBUG   "-O -g -DDEBUG")
endif()

#
# linux common variable and settings
#

# remove warning from arm cl
# https://github.com/ARM-software/ComputeLibrary/issues/330
set(GCC_VERSION_DISABLE_WARNING 6.0)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER GCC_VERSION_DISABLE_WARNING)
  message(STATUS "GCC version higher than ${GCC_VERSION_DISABLE_WARNING}")
  set(FLAGS_CXXONLY ${FLAGS_CXXONLY}
      "-Wno-ignored-attributes"
      )
endif()

# lib pthread as a variable (pthread must be disabled on android)
set(LIB_PTHREAD pthread)