Update cmake to allow C++ and fix maxos compile error

Signed-off-by: Anita Anderson <anita@ansan.io>
This commit is contained in:
Anita 2023-04-18 16:18:08 -04:00
parent 39756f4e89
commit c9c83efaa0
3 changed files with 42 additions and 25 deletions

7
.editorconfig Normal file
View File

@ -0,0 +1,7 @@
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

View File

@ -1,13 +1,15 @@
cmake_minimum_required(VERSION 3.21)
project(Erythro C)
project(Erythro C CXX)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include_directories(include)
add_executable(Erythro
include/Data.h
include/Defs.h
set(ERYTHRO_SRC
src/Assembler.c
src/Delegate.c
src/Dump.c
@ -18,4 +20,7 @@ add_executable(Erythro
src/Statements.c
src/Symbols.c
src/Types.c
src/Importer.c)
src/Importer.c
)
add_executable(eryc ${ERYTHRO_SRC})

View File

@ -12,6 +12,11 @@
#include <limits.h>
#include <sys/stat.h>
#ifdef __APPLE__
#include <errno.h>
#endif
/**
* The function of the importer is to read in definitions from a file, and store
* them into the symbol tables.