2021-10-12 20:51:03 +01:00
|
|
|
# Serene Programming Language
|
2021-09-27 13:05:15 +01:00
|
|
|
#
|
2022-01-27 11:44:44 +00:00
|
|
|
# Copyright (c) 2019-2022 Sameer Rahmani <lxsameer@gnu.org>
|
2021-09-27 13:05:15 +01:00
|
|
|
#
|
2021-10-12 20:51:03 +01:00
|
|
|
# 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.
|
2021-09-27 13:05:15 +01:00
|
|
|
#
|
2021-10-12 20:51:03 +01:00
|
|
|
# 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.
|
2021-09-27 13:05:15 +01:00
|
|
|
#
|
2021-10-12 20:51:03 +01:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2021-04-22 00:49:11 +01:00
|
|
|
|
2021-10-10 21:34:14 +01:00
|
|
|
add_executable(serenec serenec.cpp)
|
2021-03-25 00:53:44 +00:00
|
|
|
|
2021-10-10 22:28:50 +01:00
|
|
|
set_target_properties(serenec PROPERTIES
|
|
|
|
VERSION ${PROJECT_VERSION}
|
|
|
|
SOVERSION ${PROJECT_VERSION_MAJOR}
|
|
|
|
# Warn on unused libs
|
|
|
|
LINK_WHAT_YOU_USE TRUE
|
|
|
|
|
|
|
|
# LTO support
|
|
|
|
INTERPROCEDURAL_OPTIMIZATION TRUE)
|
|
|
|
|
2021-10-17 22:22:49 +01:00
|
|
|
if(SERENE_ENABLE_TIDY)
|
|
|
|
set_target_properties(serenec PROPERTIES CXX_CLANG_TIDY ${CLANG_TIDY_PATH})
|
|
|
|
endif()
|
2021-10-10 22:28:50 +01:00
|
|
|
|
2021-04-07 19:56:54 +01:00
|
|
|
if (CPP_20_SUPPORT)
|
|
|
|
target_compile_features(serenec PRIVATE cxx_std_20)
|
|
|
|
else()
|
2021-04-11 18:36:00 +01:00
|
|
|
target_compile_features(serenec PRIVATE cxx_std_17)
|
2021-04-07 19:56:54 +01:00
|
|
|
endif()
|
|
|
|
|
2021-09-28 17:45:59 +01:00
|
|
|
target_link_libraries(serenec
|
|
|
|
PRIVATE
|
2021-10-10 21:34:14 +01:00
|
|
|
|
|
|
|
Serene::lib
|
2021-12-24 16:52:43 +00:00
|
|
|
#MLIRPass
|
2021-10-10 21:34:14 +01:00
|
|
|
|
2021-12-24 16:52:43 +00:00
|
|
|
#LLVMTarget
|
|
|
|
#LLVMOption
|
|
|
|
#lldDriver
|
|
|
|
#lldELF
|
2020-07-10 18:06:26 +01:00
|
|
|
)
|
|
|
|
|
2021-09-28 17:11:50 +01:00
|
|
|
target_include_directories(serenec PRIVATE ${PROJECT_BINARY_DIR})
|
|
|
|
target_include_directories(serenec PRIVATE ${INCLUDE_DIR})
|
2020-07-23 17:13:16 +01:00
|
|
|
|
2022-02-19 14:52:47 +00:00
|
|
|
|
|
|
|
install(TARGETS serenec
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|