37 lines
1.3 KiB
CMake
37 lines
1.3 KiB
CMake
# Toolchain builder for the Serene programming language
|
|
#
|
|
# Copyright (c) 2019-2023 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/>.
|
|
set(CMAKE_SYSTEM_NAME Linux)
|
|
|
|
set(triple @TRIPLE@)
|
|
|
|
# You need to set SERENE_TOOLCHAIN_PATH before pointing to this toolchain
|
|
# file
|
|
set(CMAKE_SYSROOT ${SERENE_TOOLCHAIN_PATH})
|
|
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
|
|
|
|
set(CMAKE_C_COMPILER "clang")
|
|
set(CMAKE_CXX_COMPILER "clang++")
|
|
set(CMAKE_ASM_COMPILER "clang")
|
|
|
|
set(CMAKE_C_COMPILER_TARGET ${triple})
|
|
set(CMAKE_CXX_COMPILER_TARGET ${triple})
|
|
set(CMAKE_ASM_COMPILER_TARGET ${triple})
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|