used native LTO support from cmake 3.9.6 (#2625)
* used native LTO support from cmake 3.9.6 * Removed compilation flags push / pop * Fixes * Fixes for VPU unit tests * Temp WA for old gcc
This commit is contained in:
@@ -14,12 +14,12 @@ find_package(InferenceEngineDeveloperPackage REQUIRED)
|
||||
add_subdirectory(src)
|
||||
|
||||
if(ENABLE_TESTS)
|
||||
include(CTest)
|
||||
enable_testing()
|
||||
include(CTest)
|
||||
enable_testing()
|
||||
|
||||
if(ENABLE_FUNCTIONAL_TESTS)
|
||||
add_subdirectory(tests/functional)
|
||||
endif()
|
||||
if(ENABLE_FUNCTIONAL_TESTS)
|
||||
add_subdirectory(tests/functional)
|
||||
endif()
|
||||
endif()
|
||||
# [cmake:main]
|
||||
|
||||
|
||||
@@ -5,10 +5,6 @@
|
||||
# [cmake:plugin]
|
||||
set(TARGET_NAME "templatePlugin")
|
||||
|
||||
if(ENABLE_LTO)
|
||||
ie_enable_lto()
|
||||
endif()
|
||||
|
||||
file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||
file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)
|
||||
|
||||
@@ -20,9 +16,7 @@ ie_add_plugin(NAME ${TARGET_NAME}
|
||||
VERSION_DEFINES_FOR template_plugin.cpp)
|
||||
|
||||
target_include_directories(${TARGET_NAME} PRIVATE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
target_include_directories(${TARGET_NAME} PRIVATE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
"${IE_MAIN_TEMPLATE_PLUGIN_SOURCE_DIR}/include")
|
||||
|
||||
# link common Inference Engine libraries
|
||||
@@ -36,6 +30,8 @@ target_link_libraries(${TARGET_NAME} PRIVATE
|
||||
IE::ngraph_backend
|
||||
IE::interpreter_backend)
|
||||
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${ENABLE_LTO})
|
||||
|
||||
# ATTENTION: uncomment to register a plugin in the plugins.xml file
|
||||
# ie_register_plugins(MAIN_TARGET ${TARGET_NAME}
|
||||
# POSSIBLE_PLUGINS ${TARGET_NAME})
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
if(ENABLE_LTO AND CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.0)
|
||||
ie_enable_lto()
|
||||
endif()
|
||||
|
||||
# [cmake:functional_tests]
|
||||
set(TARGET_NAME templateFuncTests)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user