Do not build unittest when ASAN is enabled
[platform/core/api/vine.git] / tool / CMakeLists.txt
1 # Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
2 #
3 #    Licensed under the Apache License, Version 2.0 (the "License");
4 #    you may not use this file except in compliance with the License.
5 #    You may obtain a copy of the License at
6 #
7 #        http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #    Unless required by applicable law or agreed to in writing, software
10 #    distributed under the License is distributed on an "AS IS" BASIS,
11 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #    See the License for the specific language governing permissions and
13 #    limitations under the License.
14 #
15
16 SET(VINE_TOOL "vine-tool")
17
18 LINK_DIRECTORIES(${CMAKE_BINARY_DIR})
19
20 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -fPIE")
21 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
22
23 INCLUDE_DIRECTORIES(
24         ${CMAKE_SOURCE_DIR}/include
25         ${VINE_LOGGER_PATH}
26         ${fw_name_deps_INCLUDE_DIRS}
27 )
28
29 FILE(GLOB VINE_TOOL_SRCS *.cpp)
30 ADD_EXECUTABLE(${VINE_TOOL} ${VINE_TOOL_SRCS})
31 TARGET_LINK_LIBRARIES(${VINE_TOOL}
32         ${TARGET_VINE}
33         ${VINE_LOGGER}
34         ${fw_name_deps_LIBRARIES}
35 )
36
37 INSTALL(TARGETS ${VINE_TOOL} DESTINATION "${BIN_DIR}")