mirror of
https://github.com/seL4/seL4.git
synced 2026-03-27 10:29:57 +00:00
Add a CMake based build system
This commit adds an alternate build system using CMake that operates indepenently of the existing Kconfig+Kbuild+make based build system
This commit is contained in:
34
gcc.cmake
Normal file
34
gcc.cmake
Normal file
@@ -0,0 +1,34 @@
|
||||
#
|
||||
# Copyright 2017, Data61
|
||||
# Commonwealth Scientific and Industrial Research Organisation (CSIRO)
|
||||
# ABN 41 687 119 230.
|
||||
#
|
||||
# This software may be distributed and modified according to the terms of
|
||||
# the GNU General Public License version 2. Note that NO WARRANTY is provided.
|
||||
# See "LICENSE_GPLv2.txt" for details.
|
||||
#
|
||||
# @TAG(DATA61_GPL)
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.7.2)
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
# For a generic system this is unused, so define it to something that will be
|
||||
# obvious if someone accidentally uses it
|
||||
set(CMAKE_SYSTEM_PROCESSOR seL4CPU)
|
||||
|
||||
set(CMAKE_SYSROOT "${CMAKE_BINARY_DIR}")
|
||||
set(CMAKE_STAGING_PREFIX "${CMAKE_BINARY_DIR}/staging")
|
||||
|
||||
set(CMAKE_C_COMPILER ${CROSS_COMPILER_PREFIX}gcc)
|
||||
set(CMAKE_ASM_COMPILER ${CROSS_COMPILER_PREFIX}gcc)
|
||||
set(CMAKE_CXX_COMPILER ${CROSS_COMPILER_PREFIX}g++)
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||
|
||||
mark_as_advanced(FORCE CMAKE_TOOLCHAIN_FILE)
|
||||
Reference in New Issue
Block a user