From 8e59a0a79f65fa450e510fb9692e1cdb333a01af Mon Sep 17 00:00:00 2001 From: apio Date: Fri, 30 Dec 2022 11:48:18 +0100 Subject: [PATCH] CMakeLists improvements --- CMakeLists.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a43fbb8f..037a08ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,21 +9,21 @@ project(Luna LANGUAGES C CXX ASM_NASM VERSION 0.1.0) set(LUNA_ROOT ${CMAKE_CURRENT_LIST_DIR}) -set(CMAKE_C_COMPILER x86_64-luna-gcc) -set(CMAKE_CXX_COMPILER x86_64-luna-g++) - -set(CMAKE_ASM_NASM_OBJECT_FORMAT elf64) - -set(CMAKE_ASM_NASM_LINK_EXECUTABLE "x86_64-luna-ld -o ") - -set(CMAKE_FIND_ROOT_PATH ${LUNA_ROOT}/toolchain/x86-64-luna) - set(ARCH $ENV{ARCH}) if(NOT DEFINED $ENV{ARCH}) set(ARCH "x86_64") endif() +set(CMAKE_C_COMPILER ${ARCH}-luna-gcc) +set(CMAKE_CXX_COMPILER ${ARCH}-luna-g++) + +set(CMAKE_ASM_NASM_OBJECT_FORMAT elf64) + +set(CMAKE_ASM_NASM_LINK_EXECUTABLE "${ARCH}-luna-ld -o ") + +set(CMAKE_FIND_ROOT_PATH ${LUNA_ROOT}/toolchain/x86-64-luna) + message(STATUS "Configuring Luna for ${ARCH}") add_subdirectory(luna)