Skip to content

Commit 8944a36

Browse files
committed
feat: first commit!
0 parents  commit 8944a36

File tree

6 files changed

+999
-0
lines changed

6 files changed

+999
-0
lines changed

.github/workflows/tests.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
Test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Create build dir
17+
run: mkdir build/
18+
19+
- name: Go to build dir
20+
run: cd build/
21+
22+
- name: Build
23+
run: cmake ${{github.workspace}}/
24+
25+
- name: Compile
26+
run: make -j$(nproc)

.gitignore

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
*.d
2+
*.slo
3+
*.lo
4+
*.o
5+
*.obj
6+
*.gch
7+
*.pch
8+
*.so
9+
*.dylib
10+
*.dll
11+
*.mod
12+
*.smod
13+
*.lai
14+
*.la
15+
*.a
16+
*.lib
17+
*.exe
18+
*.out
19+
*.app
20+
*.ko
21+
*.elf
22+
*.ilk
23+
*.map
24+
*.exp
25+
*.so.*
26+
*.i*86
27+
*.x86_64
28+
*.hex
29+
*.dSYM/
30+
*.su
31+
*.idb
32+
*.pdb
33+
*.mod*
34+
*.cmd
35+
.tmp_versions/
36+
modules.order
37+
Module.symvers
38+
Mkfile.old
39+
dkms.conf
40+
.idea
41+
*.iml
42+
out
43+
gen
44+
.idea/**/workspace.xml
45+
.idea/**/tasks.xml
46+
.idea/**/usage.statistics.xml
47+
.idea/**/dictionaries
48+
.idea/**/shelf
49+
.idea/**/aws.xml
50+
.idea/**/contentModel.xml
51+
.idea/**/dataSources/
52+
.idea/**/dataSources.ids
53+
.idea/**/dataSources.local.xml
54+
.idea/**/sqlDataSources.xml
55+
.idea/**/dynamic.xml
56+
.idea/**/uiDesigner.xml
57+
.idea/**/dbnavigator.xml
58+
.idea/**/gradle.xml
59+
.idea/**/libraries
60+
cmake-build-*/
61+
.idea/**/mongoSettings.xml
62+
*.iwss
63+
out/
64+
.idea_modules/
65+
atlassian-ide-plugin.xml
66+
.idea/replstate.xml
67+
.idea/sonarlint/
68+
com_crashlytics_export_strings.xml
69+
crashlytics.properties
70+
crashlytics-build.properties
71+
fabric.properties
72+
.idea/httpRequests
73+
.idea/caches/build_file_checksums.ser

CMakeLists.txt

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
cmake_minimum_required(VERSION 3.28)
2+
3+
set(EXEC_NAME "calcplusplus")
4+
project(calcplusplus VERSION 0.1.0)
5+
6+
if(NOT DEFINED CMAKE_BUILD_TYPE)
7+
set(CMAKE_BUILD_TYPE "Debug")
8+
endif()
9+
10+
set(ENABLE_SAMPLES OFF)
11+
set(BUILD_TESTING OFF)
12+
set(ENABLE_OPENMP OFF)
13+
14+
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
15+
set(FTXUI_DEV_WARNINGS ON)
16+
17+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
18+
endif()
19+
20+
include(FetchContent)
21+
22+
FetchContent_Declare(ftxui
23+
GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
24+
GIT_TAG v5.0.0
25+
)
26+
FetchContent_GetProperties(ftxui)
27+
if(NOT ftxui_POPULATED)
28+
FetchContent_Populate(ftxui)
29+
add_subdirectory(${ftxui_SOURCE_DIR} ${ftxui_BINARY_DIR} EXCLUDE_FROM_ALL)
30+
endif()
31+
32+
FetchContent_Declare(muparser
33+
GIT_REPOSITORY https://github.com/beltoforion/muparser
34+
GIT_TAG v2.3.4
35+
)
36+
FetchContent_GetProperties(muparser)
37+
if(NOT muparser_POPULATED)
38+
FetchContent_Populate(muparser)
39+
add_subdirectory(${muparser_SOURCE_DIR} ${muparser_BINARY_DIR} EXCLUDE_FROM_ALL)
40+
endif()
41+
42+
file(GLOB HEADERS
43+
"include/*.h"
44+
"include/*.hh"
45+
"include/*.hpp"
46+
"include/*.hxx"
47+
)
48+
49+
file(GLOB SRC
50+
"src/*.c"
51+
"src/*.cc"
52+
"src/*.cpp"
53+
"src/*.cxx"
54+
)
55+
56+
include_directories(include)
57+
58+
add_executable(${EXEC_NAME} ${SRC} ${HEADERS})
59+
target_include_directories(${EXEC_NAME} PRIVATE ${HEADERS})
60+
61+
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
62+
target_link_options(${EXEC_NAME} PRIVATE -fsanitize=address)
63+
endif()
64+
65+
target_link_libraries(${EXEC_NAME}
66+
PRIVATE ftxui::screen
67+
PRIVATE ftxui::dom
68+
PRIVATE ftxui::component
69+
70+
PRIVATE muparser::muparser
71+
)

0 commit comments

Comments
 (0)