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