author | František Kučera <franta-hg@frantovo.cz> |
Mon, 24 Sep 2018 13:59:06 +0200 | |
branch | v_0 |
changeset 2 | 7ba3ae8cf1fc |
parent 1 | 0e791c64f38b |
child 3 | 0d857519a4c9 |
permissions | -rw-r--r-- |
2
7ba3ae8cf1fc
add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents:
1
diff
changeset
|
1 |
set(EXECUTABLE_FILE "relpipe-out-chart") |
7ba3ae8cf1fc
add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents:
1
diff
changeset
|
2 |
|
1
0e791c64f38b
add ASan AddressSanitizer to detect memory leaks
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
3 |
# Add ASan AddressSanitizer |
0e791c64f38b
add ASan AddressSanitizer to detect memory leaks
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
4 |
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") |
0e791c64f38b
add ASan AddressSanitizer to detect memory leaks
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
5 |
set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") |
0e791c64f38b
add ASan AddressSanitizer to detect memory leaks
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
6 |
# From ASan wiki: "To get nicer stack traces in error messages add -fno-omit-frame-pointer." |
0e791c64f38b
add ASan AddressSanitizer to detect memory leaks
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
7 |
|
2
7ba3ae8cf1fc
add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents:
1
diff
changeset
|
8 |
INCLUDE(FindPkgConfig) |
7ba3ae8cf1fc
add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents:
1
diff
changeset
|
9 |
pkg_check_modules (RELPIPE_LIB_READER relpipe-lib-reader.cpp relpipe-lib-cli.cpp) |
7ba3ae8cf1fc
add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents:
1
diff
changeset
|
10 |
include_directories(${RELPIPE_LIB_READER_INCLUDE_DIRS}) |
7ba3ae8cf1fc
add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents:
1
diff
changeset
|
11 |
link_directories(${RELPIPE_LIB_READER_LIBRARY_DIRS}) |
7ba3ae8cf1fc
add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents:
1
diff
changeset
|
12 |
|
7ba3ae8cf1fc
add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents:
1
diff
changeset
|
13 |
add_executable (${EXECUTABLE_FILE} relpipe-out-chart.cpp) |
7ba3ae8cf1fc
add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents:
1
diff
changeset
|
14 |
|
7ba3ae8cf1fc
add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents:
1
diff
changeset
|
15 |
target_link_libraries(${EXECUTABLE_FILE} ${RELPIPE_LIB_READER_LIBRARIES}) |