builder: Add a dummy linux toolchain file
This commit is contained in:
parent
4d5027d13d
commit
4ec2e35ed8
4
builder
4
builder
|
@ -155,8 +155,8 @@ function popd_build() {
|
|||
function build-gen() {
|
||||
pushed_build
|
||||
info "Running: "
|
||||
info "cmake -G Ninja ${CMAKEARGS[*]} ${CMAKEARGS_DEBUG[*]}" "$@" "$ME"
|
||||
cmake -G Ninja "${CMAKEARGS[@]}" "${CMAKEARGS_DEBUG[@]}" "$@" "$ME"
|
||||
info "cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=$ME/cmake/toolchains/linux.cmake" "$ME" "${CMAKEARGS[*]} ${CMAKEARGS_DEBUG[*]}" "$@"
|
||||
cmake -G Ninja "-DCMAKE_TOOLCHAIN_FILE=$ME/cmake/toolchains/linux.cmake" "$ME" "${CMAKEARGS[@]}" "${CMAKEARGS_DEBUG[@]}" "$@"
|
||||
popd_build
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
# 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(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
|
||||
set(triple x86_64-unknown-linux-gnu)
|
||||
|
||||
set(CMAKE_C_COMPILER "${SERENE_TOOLCHAIN_PATH}/bin/clang")
|
||||
set(CMAKE_C_COMPILER_TARGET ${triple})
|
||||
|
||||
set(CMAKE_CXX_COMPILER "${SERENE_TOOLCHAIN_PATH}/bin/clang++")
|
||||
set(CMAKE_CXX_COMPILER_TARGET ${triple})
|
||||
|
||||
# where is the target environment located
|
||||
set(CMAKE_FIND_ROOT_PATH "${SERENE_TOOLCHAIN_PATH}")
|
||||
|
||||
# adjust the default behavior of the FIND_XXX() commands:
|
||||
# search programs in the host environment
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
|
||||
# search headers and libraries in the target environment
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
message(">>>> ${CMAKE_C_COMPILER} -- ${SERENE_TOOLCHAIN_PATH}")
|
Loading…
Reference in New Issue