diff options
Diffstat (limited to 'infra/nnfw/cmake/buildtool/config/config_linux.cmake')
-rw-r--r-- | infra/nnfw/cmake/buildtool/config/config_linux.cmake | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/infra/nnfw/cmake/buildtool/config/config_linux.cmake b/infra/nnfw/cmake/buildtool/config/config_linux.cmake new file mode 100644 index 000000000..a17bbb2bd --- /dev/null +++ b/infra/nnfw/cmake/buildtool/config/config_linux.cmake @@ -0,0 +1,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) |