author | František Kučera <franta-hg@frantovo.cz> |
Sat, 05 Dec 2020 19:32:05 +0100 | |
branch | v_0 |
changeset 4 | c176766462c5 |
parent 1 | 8d2d8f4077af |
child 8 | 35696fee5662 |
permissions | -rw-r--r-- |
0 | 1 |
# Relational pipes |
1
8d2d8f4077af
OOP wrapper for yaml.h + list event types
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
2 |
# Copyright © 2020 František Kučera (Frantovo.cz, GlobalCode.info) |
0 | 3 |
# |
4 |
# This program is free software: you can redistribute it and/or modify |
|
5 |
# it under the terms of the GNU General Public License as published by |
|
6 |
# the Free Software Foundation, version 3 of the License. |
|
7 |
# |
|
8 |
# This program is distributed in the hope that it will be useful, |
|
9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 |
# GNU General Public License for more details. |
|
12 |
# |
|
13 |
# You should have received a copy of the GNU General Public License |
|
14 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
15 |
||
16 |
set(EXECUTABLE_FILE "relpipe-in-yaml") |
|
17 |
set(EXECUTABLE_FILE_JSON "relpipe-in-json") |
|
18 |
||
19 |
# Relpipe libraries: |
|
20 |
INCLUDE(FindPkgConfig) |
|
21 |
pkg_check_modules (RELPIPE_LIBS relpipe-lib-writer.cpp relpipe-lib-cli.cpp yaml-0.1) |
|
22 |
include_directories(${RELPIPE_LIBS_INCLUDE_DIRS}) |
|
23 |
link_directories(${RELPIPE_LIBS_LIBRARY_DIRS}) |
|
24 |
||
25 |
# Add ASan AddressSanitizer |
|
26 |
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") |
|
27 |
set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") |
|
28 |
# From ASan wiki: "To get nicer stack traces in error messages add -fno-omit-frame-pointer." |
|
29 |
||
30 |
# Executable output: |
|
31 |
add_executable( |
|
32 |
${EXECUTABLE_FILE} |
|
33 |
relpipe-in-yaml.cpp |
|
34 |
) |
|
35 |
||
36 |
ADD_CUSTOM_TARGET(in_mode_symlink ALL COMMAND ${CMAKE_COMMAND} -E create_symlink ${EXECUTABLE_FILE} ${EXECUTABLE_FILE_JSON}) |
|
37 |
||
38 |
# Link libraries: |
|
39 |
target_link_libraries(${EXECUTABLE_FILE} ${RELPIPE_LIBS_LIBRARIES}) |
|
40 |
set_property(TARGET ${EXECUTABLE_FILE} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE) |
|
41 |
||
42 |
install(TARGETS ${EXECUTABLE_FILE} DESTINATION bin) |