36b1a451738017098eb8cb14bfe38be955c15c55
[platform/upstream/dldt.git] / ngraph / test / runtime / CMakeLists.txt
1 # ******************************************************************************
2 # Copyright 2017-2020 Intel Corporation
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 # ******************************************************************************
16 set (SRC
17     backend.cpp
18     backend.hpp
19     backend_manager.cpp
20     backend_manager.hpp
21     cache.cpp
22     cache.hpp
23     executable.cpp
24     executable.hpp
25     performance_counter.hpp
26     dynamic/dynamic_backend.cpp
27     dynamic/dynamic_backend.hpp
28     op/avg_pool.cpp
29     op/avg_pool.hpp
30     op/convolution.cpp
31     op/convolution.hpp
32     op/group_conv.cpp
33     op/group_conv.hpp
34     pass/dyn_elimination.cpp
35     pass/dyn_elimination.hpp
36     pass/fused_op_decomposition.cpp
37     pass/fused_op_decomposition.hpp
38     pass/implicit_broadcast_elimination.cpp
39     pass/implicit_broadcast_elimination.hpp
40     pass/like_replacement.cpp
41     pass/like_replacement.hpp
42     pass/liveness.cpp
43     pass/liveness.hpp
44     pass/opset0_downgrade.cpp
45     pass/opset0_downgrade.hpp
46     pass/opset1_downgrade.cpp
47     pass/opset1_downgrade.hpp
48     pass/opset1_upgrade.cpp
49     pass/opset1_upgrade.hpp
50     pass/shape_relevance.cpp
51     pass/shape_relevance.hpp
52     )
53
54 disable_deprecated_warnings()
55
56 add_library(ngraph_backend SHARED ${SRC})
57
58 if(COMMAND ie_faster_build)
59     ie_faster_build(ngraph_backend
60         UNITY
61     )
62 endif()
63
64 target_compile_definitions(ngraph_backend
65     PRIVATE
66         SHARED_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}"
67         SHARED_LIB_SUFFIX="${IE_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}"
68 )
69 target_link_libraries(ngraph_backend PUBLIC ngraph 
70                                             ngraph::builder
71                                             ngraph::reference)
72 if (NOT WIN32)
73     target_link_libraries(ngraph_backend PRIVATE dl)
74 endif()
75 target_compile_definitions(ngraph_backend PRIVATE BACKEND_DLL_EXPORTS)
76 target_include_directories(ngraph_backend PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
77
78 add_subdirectory(interpreter)
79 add_subdirectory(ie)