diff options
author | bd <bdunahu@operationnull.com> | 2025-02-24 19:44:00 -0500 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-02-24 19:44:00 -0500 |
commit | 9028b78a0d668a8893d4e5ce65fa1d332be35cfa (patch) | |
tree | d7c2716391e501dfcb2834463771a7a1c1968c91 | |
parent | 42c03e2ad6110625b54c8aab5960a5d3723e54b0 (diff) |
Configure CMake
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | CMakeLists.txt | 13 | ||||
-rw-r--r-- | Makefile | 18 | ||||
-rw-r--r-- | README.md | 13 |
4 files changed, 27 insertions, 23 deletions
@@ -1,7 +1,7 @@ # IDE -.dir-locals.el -manifest.scm +/.dir-locals.el +/manifest.scm # generated __pycache__ -rv +/build/ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..505517f --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.11) +project(risc_vector) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_COMPILER "g++") +set(SRCDIR src) +set(PYTHON_VERSION 3.10) + +find_package(Python3 COMPONENTS Development REQUIRED) + +add_executable(${PROJECT_NAME} ${SRCDIR}/rv.cc) + +target_link_libraries(${PROJECT_NAME} Python3::Python) diff --git a/Makefile b/Makefile deleted file mode 100644 index 0d06904..0000000 --- a/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -CXX = g++ -PYTHON_VERSION = 3.10 - -CXXFLAGS = -I$(shell python$(PYTHON_VERSION)-config --includes) -LDFLAGS = $(shell python$(PYTHON_VERSION)-config --ldflags --embed) - -SRCDIR = src - -all: rv - -rv: $(SRCDIR)/rv.cc - $(CXX) $(CXXFLAGS) -o rv $(SRCDIR)/rv.cc $(LDFLAGS) - -test: - @echo "foo" - -clean: - rm -f rv @@ -1,6 +1,15 @@ # Risc V[ECTOR] -# About +## to compile +Generate the build directory with +`cmake -S . -B build` +then +`cmake --build build` + +## to test + +# about University of Massachusetts, Amherst -CS535 -- Computer Architecture and ISA Design
\ No newline at end of file +CS535 -- Computer Architecture and ISA Design + |