2024-12-06 19:48:38 +00:00
|
|
|
cmake_minimum_required(VERSION 3.28)
|
|
|
|
project(rve)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 23)
|
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS true)
|
|
|
|
|
|
|
|
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
|
|
|
|
2024-12-06 21:27:44 +00:00
|
|
|
set (CMAKE_CXX_FLAGS "-static-libgcc -static-libstdc++ -Werror -Wall -Wunused-result -Wno-unused-function -Wno-unused-variable -fno-omit-frame-pointer -fsanitize=address -Wno-c99-designator")
|
2024-12-06 19:48:38 +00:00
|
|
|
|
|
|
|
add_library(vm_lib)
|
|
|
|
target_sources(vm_lib
|
|
|
|
PRIVATE
|
|
|
|
src/vm.cpp
|
2024-12-08 23:32:45 +00:00
|
|
|
src/debug.cpp
|
2024-12-10 17:32:33 +00:00
|
|
|
src/elf.cpp
|
2024-12-06 19:48:38 +00:00
|
|
|
|
|
|
|
PUBLIC
|
|
|
|
FILE_SET HEADERS
|
|
|
|
BASE_DIRS src
|
|
|
|
FILES
|
|
|
|
src/vm.hpp
|
2024-12-08 23:32:45 +00:00
|
|
|
src/debug.hpp
|
2024-12-10 17:32:33 +00:00
|
|
|
src/elf.hpp
|
2024-12-06 19:48:38 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(rve src/rve.cpp)
|
|
|
|
target_link_libraries(rve vm_lib)
|
|
|
|
|
|
|
|
install(TARGETS rve)
|