author | František Kučera <franta-hg@frantovo.cz> |
Sat, 09 Mar 2019 12:30:52 +0100 | |
branch | v_0 |
changeset 5 | 26e9fb705faf |
parent 1 | ac5f3768ebb1 |
child 8 | 1dab2b99f51d |
permissions | -rw-r--r-- |
1
ac5f3768ebb1
almost working, but there is an SIGABRT
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
1 |
# Spacenav lib hack |
ac5f3768ebb1
almost working, but there is an SIGABRT
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
2 |
# Copyright © 2019 František Kučera (Frantovo.cz, GlobalCode.info) |
0
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
3 |
# |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
4 |
# This program is free software: you can redistribute it and/or modify |
37aa134ae57b
empty QT project linked to spnav library
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 |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
6 |
# the Free Software Foundation, either version 3 of the License, or |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
7 |
# (at your option) any later version. |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
8 |
# |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
9 |
# This program is distributed in the hope that it will be useful, |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
12 |
# GNU General Public License for more details. |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
13 |
# |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
14 |
# You should have received a copy of the GNU General Public License |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
16 |
|
1
ac5f3768ebb1
almost working, but there is an SIGABRT
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
17 |
set(LIBRARY_FILE spnav-lib-hack) |
0
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
18 |
|
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
19 |
# Add ASan AddressSanitizer |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
20 |
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
21 |
set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
22 |
# From ASan wiki: "To get nicer stack traces in error messages add -fno-omit-frame-pointer." |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
23 |
|
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
24 |
# Executable output: |
1
ac5f3768ebb1
almost working, but there is an SIGABRT
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
25 |
add_library( |
ac5f3768ebb1
almost working, but there is an SIGABRT
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
26 |
${LIBRARY_FILE} SHARED |
ac5f3768ebb1
almost working, but there is an SIGABRT
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
27 |
spacenav-lib-hack.h |
ac5f3768ebb1
almost working, but there is an SIGABRT
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
28 |
spacenav-lib-hack.c |
0
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
29 |
) |
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
30 |
|
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
31 |
# Link libraries: |
1
ac5f3768ebb1
almost working, but there is an SIGABRT
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
32 |
target_link_libraries(${LIBRARY_FILE} -ldl -lX11 -lm -lspnav) |
0
37aa134ae57b
empty QT project linked to spnav library
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
33 |