Leavitt/bin/CMakeLists.txt

49 lines
1.4 KiB
CMake

# Leavitt - Source base todo manager for C family of languages
#
# Copyright (c) 2022 Sameer Rahmani <lxsameer@gnu.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
add_executable(leavitt leavitt.cpp)
set_target_properties(leavitt PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}
# Warn on unused libs
LINK_WHAT_YOU_USE TRUE
CXX_INCLUDE_WHAT_YOU_USE "${iwyu_path}"
C_INCLUDE_WHAT_YOU_USE "${iwyu_path}"
# LTO support
INTERPROCEDURAL_OPTIMIZATION TRUE)
if(LEAVITT_ENABLE_TIDY)
set_target_properties(leavitt PROPERTIES CXX_CLANG_TIDY ${CLANG_TIDY_PATH})
endif()
target_compile_features(leavitt PRIVATE cxx_std_17)
target_link_libraries(leavitt
PRIVATE
clangTooling
)
target_include_directories(leavitt PRIVATE ${PROJECT_BINARY_DIR})
target_include_directories(leavitt PRIVATE ${INCLUDE_DIR})
install(TARGETS leavitt
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})