author | František Kučera <franta-hg@frantovo.cz> |
Mon, 25 May 2020 19:36:06 +0200 | |
branch | v_0 |
changeset 34 | 24c05e69d68f |
parent 27 | 9441a517fa1f |
child 35 | cd9db43db120 |
permissions | -rw-r--r-- |
0 | 1 |
# Relational pipes |
2 |
# Copyright © 2019 František Kučera (Frantovo.cz, GlobalCode.info) |
|
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 |
|
10
7da7173d84b0
fix license version: GNU GPLv3
František Kučera <franta-hg@frantovo.cz>
parents:
1
diff
changeset
|
6 |
# the Free Software Foundation, version 3. |
0 | 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 |
||
21
0cfba89d5691
cmake: create relpipe-in-sql symlink
František Kučera <franta-hg@frantovo.cz>
parents:
10
diff
changeset
|
16 |
set(EXECUTABLE_FILE "relpipe-tr-sql") |
0cfba89d5691
cmake: create relpipe-in-sql symlink
František Kučera <franta-hg@frantovo.cz>
parents:
10
diff
changeset
|
17 |
set(EXECUTABLE_FILE_IN "relpipe-in-sql") |
0 | 18 |
|
34
24c05e69d68f
add ODBC library and --list-data-sources mode (DSN)
František Kučera <franta-hg@frantovo.cz>
parents:
27
diff
changeset
|
19 |
# ODBC libraries: |
24c05e69d68f
add ODBC library and --list-data-sources mode (DSN)
František Kučera <franta-hg@frantovo.cz>
parents:
27
diff
changeset
|
20 |
include("FindODBC.cmake") |
24c05e69d68f
add ODBC library and --list-data-sources mode (DSN)
František Kučera <franta-hg@frantovo.cz>
parents:
27
diff
changeset
|
21 |
|
0 | 22 |
# Relpipe libraries: |
23 |
INCLUDE(FindPkgConfig) |
|
1
eb7134dfdcc5
link to the sqlite3 library
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
24 |
pkg_check_modules (RELPIPE_LIBS relpipe-lib-reader.cpp relpipe-lib-writer.cpp relpipe-lib-cli.cpp sqlite3) |
34
24c05e69d68f
add ODBC library and --list-data-sources mode (DSN)
František Kučera <franta-hg@frantovo.cz>
parents:
27
diff
changeset
|
25 |
include_directories(${RELPIPE_LIBS_INCLUDE_DIRS} ${ODBC_INCLUDE_DIRS}) |
0 | 26 |
link_directories(${RELPIPE_LIBS_LIBRARY_DIRS}) |
27 |
||
28 |
# Add ASan AddressSanitizer |
|
29 |
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") |
|
30 |
set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") |
|
31 |
# From ASan wiki: "To get nicer stack traces in error messages add -fno-omit-frame-pointer." |
|
32 |
||
33 |
# Executable output: |
|
34 |
add_executable( |
|
35 |
${EXECUTABLE_FILE} |
|
26
49919a60c747
move PreparedStatement class to separate .h and .cpp files
František Kučera <franta-hg@frantovo.cz>
parents:
21
diff
changeset
|
36 |
PreparedStatement.cpp |
27
9441a517fa1f
move Connection class to separate .h and .cpp files
František Kučera <franta-hg@frantovo.cz>
parents:
26
diff
changeset
|
37 |
Connection.cpp |
34
24c05e69d68f
add ODBC library and --list-data-sources mode (DSN)
František Kučera <franta-hg@frantovo.cz>
parents:
27
diff
changeset
|
38 |
DriverManager.cpp |
0 | 39 |
relpipe-tr-sql.cpp |
40 |
) |
|
41 |
||
21
0cfba89d5691
cmake: create relpipe-in-sql symlink
František Kučera <franta-hg@frantovo.cz>
parents:
10
diff
changeset
|
42 |
ADD_CUSTOM_TARGET(in_mode_symlink ALL COMMAND ${CMAKE_COMMAND} -E create_symlink ${EXECUTABLE_FILE} ${EXECUTABLE_FILE_IN}) |
0cfba89d5691
cmake: create relpipe-in-sql symlink
František Kučera <franta-hg@frantovo.cz>
parents:
10
diff
changeset
|
43 |
|
0 | 44 |
# Link libraries: |
34
24c05e69d68f
add ODBC library and --list-data-sources mode (DSN)
František Kučera <franta-hg@frantovo.cz>
parents:
27
diff
changeset
|
45 |
target_link_libraries(${EXECUTABLE_FILE} ${RELPIPE_LIBS_LIBRARIES} ${ODBC_LIBRARIES}) |
0 | 46 |
set_property(TARGET ${EXECUTABLE_FILE} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE) |
47 |
||
48 |
install(TARGETS ${EXECUTABLE_FILE} DESTINATION bin) |
|
21
0cfba89d5691
cmake: create relpipe-in-sql symlink
František Kučera <franta-hg@frantovo.cz>
parents:
10
diff
changeset
|
49 |
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE_FILE_IN} DESTINATION bin) |