From d536e02ea01818739e90619f24e3cefdd2a5c4ec Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 18 Mar 2023 10:28:17 +0100 Subject: [PATCH] Fixed CMakeLists.txt and removed old Makefile --- .gitignore | 7 ++++++- cpp/CMakeLists.txt | 2 +- cpp/Makefile | 40 ---------------------------------------- 3 files changed, 7 insertions(+), 42 deletions(-) delete mode 100644 cpp/Makefile diff --git a/.gitignore b/.gitignore index 69dff35..dbaca03 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ cpp/build/* python/__pycache__/* -.vscode/* \ No newline at end of file +.vscode/* +cpp/CMakeFiles/ +cpp/CMakeCache.txt +cpp/cmake_install.cmake +cpp/Makefile +cpp/CubicLagrangeMinimize* \ No newline at end of file diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 3d13685..551c37e 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -7,7 +7,7 @@ set(CMAKE_CXX_STANDARD 11) # Find the Eigen library find_package(Eigen3 REQUIRED) -include_directories(${EIGEN3_INCLUDE_DIRS}) +include_directories(${EIGEN3_INCLUDE_DIRS} include) # Add the source files set(SOURCES diff --git a/cpp/Makefile b/cpp/Makefile deleted file mode 100644 index fb1c189..0000000 --- a/cpp/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# Makefile for compiling C++ project - -# Compiler -CXX = g++ - -# Compiler options -CXXFLAGS = -std=c++11 -Wall -Wextra - -# Linker options -LDFLAGS = - -# Include path -INC_PATH = -I./include -ID:/Users/Jerome/Documents/Ingenierie/Programmation/eigen-3.4.0 - -# Source path -SRC_PATH = ./src - -# Build path -BUILD_PATH = ./build - -# Source files -SRCS := $(wildcard $(SRC_PATH)/*.cpp) - -# Object files -OBJS := $(patsubst $(SRC_PATH)/%.cpp,$(BUILD_PATH)/%.o,$(SRCS)) - -# Executable -EXEC = $(BUILD_PATH)/CubicLagrangeMinimize - -# Targets -all: $(EXEC) - -$(EXEC): $(OBJS) - $(CXX) $(LDFLAGS) $(OBJS) -o $(EXEC) - -$(BUILD_PATH)/%.o: $(SRC_PATH)/%.cpp - $(CXX) $(CXXFLAGS) $(INC_PATH) -c $< -o $@ - -clean: - rm -f $(OBJS) $(EXEC)