src/CMakeLists.txt
author František Kučera <franta-hg@frantovo.cz>
Sun, 25 Jul 2021 11:53:55 +0200
branchv_0
changeset 2 7128fabeede0
parent 0 28294b895e5e
permissions -rw-r--r--
FreeformASN1ContentHandler: basic ASN.1 tree in a relation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
# Relational pipes
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
# Copyright © 2021 František Kučera (Frantovo.cz, GlobalCode.info)
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
#
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
# This program is free software: you can redistribute it and/or modify
28294b895e5e project skeleton + configuration
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
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
# the Free Software Foundation, version 3 of the License.
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
#
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
# This program is distributed in the hope that it will be useful,
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
# GNU General Public License for more details.
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
#
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
# You should have received a copy of the GNU General Public License
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
# along with this program. If not, see <http://www.gnu.org/licenses/>.
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
set(EXECUTABLE_FILE "relpipe-in-asn1")
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
# Relpipe libraries:
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
INCLUDE(FindPkgConfig)
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
pkg_check_modules (RELPIPE_LIBS relpipe-lib-writer.cpp relpipe-lib-cli.cpp)
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
include_directories(${RELPIPE_LIBS_INCLUDE_DIRS})
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
link_directories(${RELPIPE_LIBS_LIBRARY_DIRS})
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
# Add ASan AddressSanitizer
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
# From ASan wiki: "To get nicer stack traces in error messages add -fno-omit-frame-pointer."
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
# Executable output:
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
add_executable(
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
	${EXECUTABLE_FILE}
2
7128fabeede0 FreeformASN1ContentHandler: basic ASN.1 tree in a relation
František Kučera <franta-hg@frantovo.cz>
parents: 0
diff changeset
    32
	lib/AbstractParser.cpp
0
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
	ASN1Command.cpp
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
	relpipe-in-asn1.cpp
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
)
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    37
# Link libraries:
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    38
target_link_libraries(${EXECUTABLE_FILE} ${RELPIPE_LIBS_LIBRARIES})
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
set_property(TARGET ${EXECUTABLE_FILE} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    40
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    41
install(TARGETS ${EXECUTABLE_FILE} DESTINATION bin)