- Replace neurun frontends and core strict build setting cmake from using compile option to linking nnfw_common interface
- Add strict build setting for nnfw api frontend and fix unused parameter warning
Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
set_target_properties(neurun-core PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(neurun-core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_include_directories(neurun-core PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
-target_link_libraries(neurun-core nnfw_lib_misc nnfw_lib_cpp14 nnfw_lib_cker dl)
-target_compile_options(neurun-core PRIVATE -Wall -Wextra -Werror)
+target_link_libraries(neurun-core PUBLIC nnfw_lib_misc nnfw_lib_cpp14)
+target_link_libraries(neurun-core PRIVATE nnfw_lib_cker dl)
+target_link_libraries(neurun-core PRIVATE dl nnfw_common)
set(NEURUN_DEV nnfw-dev)
add_library(${NEURUN_DEV} SHARED ${API_SRC})
-target_link_libraries(${NEURUN_DEV} nnfw-header)
-target_link_libraries(${NEURUN_DEV} ${LIB_NEURUN})
-target_link_libraries(${NEURUN_DEV} jsoncpp tflite_loader pthread)
+target_link_libraries(${NEURUN_DEV} PUBLIC nnfw-header)
+target_link_libraries(${NEURUN_DEV} PUBLIC neurun-core) # TODO Link PRIVATE neurun-core
+target_link_libraries(${NEURUN_DEV} PRIVATE jsoncpp tflite_loader pthread)
+target_link_libraries(${NEURUN_DEV} PRIVATE nnfw_common)
install(TARGETS ${NEURUN_DEV} DESTINATION lib)
return NNFW_STATUS_NO_ERROR;
}
-NNFW_STATUS nnfw_session::set_input(int index, NNFW_TYPE type, const void *buffer, size_t length)
+NNFW_STATUS nnfw_session::set_input(int index, NNFW_TYPE /*type*/, const void *buffer,
+ size_t length)
{
try
{
return NNFW_STATUS_NO_ERROR;
}
-NNFW_STATUS nnfw_session::set_output(int index, NNFW_TYPE type, void *buffer, size_t length)
+NNFW_STATUS nnfw_session::set_output(int index, NNFW_TYPE /*type*/, void *buffer, size_t length)
{
try
{
file(GLOB_RECURSE SOURCES_FRONTEND "*.cc")
add_library(${LIB_NEURUN} SHARED ${SOURCES_FRONTEND})
-target_link_libraries(${LIB_NEURUN} nnfw-header)
-target_link_libraries(${LIB_NEURUN} neurun-core)
-
-target_compile_options(${LIB_NEURUN} PRIVATE -Wall -Wextra -Werror)
+target_link_libraries(${LIB_NEURUN} PUBLIC nnfw-header)
+target_link_libraries(${LIB_NEURUN} PUBLIC neurun-core) # TODO Link PRIVATE neurun-core
+target_link_libraries(${LIB_NEURUN} PRIVATE nnfw_common)
set_target_properties(${LIB_NEURUN} PROPERTIES OUTPUT_NAME neuralnetworks)
nnfw_find_package(FlatBuffersSource REQUIRED)
target_include_directories(tflite_loader PUBLIC ${FlatBuffersSource_DIR}/include .)
-target_link_libraries(tflite_loader PRIVATE neurun-core)
-target_link_libraries(tflite_loader PRIVATE nnfw_lib_misc nnfw_lib_cpp14)
-
-target_compile_options(tflite_loader PRIVATE -Wall -Wextra -Werror)
+target_link_libraries(tflite_loader PUBLIC neurun-core) # TODO Link PRIVATE neurun-core
+target_link_libraries(tflite_loader PUBLIC nnfw_lib_misc nnfw_lib_cpp14)
+target_link_libraries(tflite_loader PRIVATE nnfw_common)
install(TARGETS tflite_loader DESTINATION lib)