list(APPEND SRCS ${CORE_SRCS})
list(APPEND SRCS ${KERNEL_SRCS})
+include(CheckCXXCompilerFlag)
+
+CHECK_CXX_COMPILER_FLAG(-Wno-extern-c-compat COMPILER_SUPPORT_EXTERN_C_COMPAT_WARNING)
+
add_library(tensorflowlite ${SRCS})
set_target_properties(tensorflowlite PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(tensorflowlite PUBLIC ${TensorFlowSource_DIR})
target_compile_options(tensorflowlite PUBLIC -Wno-ignored-attributes)
+if(COMPILER_SUPPORT_EXTERN_C_COMPAT_WARNING)
+ target_compile_options(tensorflowlite PUBLIC -Wno-extern-c-compat)
+endif(COMPILER_SUPPORT_EXTERN_C_COMPAT_WARNING)
target_compile_definitions(tensorflowlite PUBLIC "GEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK")
target_link_libraries(tensorflowlite eigen gemmlowp neon2sse farmhash flatbuffers dl)