mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-05 22:38:44 +00:00
59 lines
1.6 KiB
CMake
59 lines
1.6 KiB
CMake
# this is the build file for project
|
|
# it is autogenerated by the xmake build system.
|
|
# do not edit by hand.
|
|
|
|
# project
|
|
cmake_minimum_required(VERSION 3.15.0)
|
|
cmake_policy(SET CMP0091 NEW)
|
|
project(byterun LANGUAGES ASM CXX C)
|
|
|
|
# target
|
|
add_executable(byterun "")
|
|
set_target_properties(byterun PROPERTIES OUTPUT_NAME "byterun")
|
|
set_target_properties(byterun PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/build/linux/x86_64/release")
|
|
target_include_directories(byterun PRIVATE
|
|
include
|
|
../runtime
|
|
)
|
|
target_compile_definitions(byterun PRIVATE
|
|
WITH_CHECK
|
|
)
|
|
target_compile_options(byterun PRIVATE
|
|
$<$<COMPILE_LANGUAGE:C>:-m64>
|
|
$<$<COMPILE_LANGUAGE:CXX>:-m64>
|
|
$<$<COMPILE_LANGUAGE:C>:-O3>
|
|
$<$<COMPILE_LANGUAGE:CXX>:-O3>
|
|
)
|
|
if(MSVC)
|
|
elseif(Clang)
|
|
target_compile_options(byterun PRIVATE -Wall)
|
|
target_compile_options(byterun PRIVATE -Wextra)
|
|
elseif(Gcc)
|
|
target_compile_options(byterun PRIVATE -Wall)
|
|
target_compile_options(byterun PRIVATE -Wextra)
|
|
endif()
|
|
set_target_properties(byterun PROPERTIES CXX_EXTENSIONS OFF)
|
|
target_compile_features(byterun PRIVATE cxx_std_20)
|
|
set_target_properties(byterun PROPERTIES C_EXTENSIONS OFF)
|
|
target_compile_features(byterun PRIVATE c_std_11)
|
|
if(MSVC)
|
|
set_property(TARGET byterun PROPERTY
|
|
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
|
endif()
|
|
target_link_options(byterun PRIVATE
|
|
-m64
|
|
)
|
|
target_sources(byterun PRIVATE
|
|
../runtime/printf.S
|
|
src/parser.cpp
|
|
src/module_manager.cpp
|
|
src/analyzer.cpp
|
|
src/cli.cpp
|
|
src/compiler.cpp
|
|
src/sm_parser.cpp
|
|
../runtime/gc.c
|
|
../runtime/runtime.c
|
|
src/types.c
|
|
src/interpreter.c
|
|
)
|
|
|