Fixed CMakeLists.txt and removed old Makefile
This commit is contained in:
parent
11eb5bc327
commit
d536e02ea0
3 changed files with 7 additions and 42 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -1,3 +1,8 @@
|
||||||
cpp/build/*
|
cpp/build/*
|
||||||
python/__pycache__/*
|
python/__pycache__/*
|
||||||
.vscode/*
|
.vscode/*
|
||||||
|
cpp/CMakeFiles/
|
||||||
|
cpp/CMakeCache.txt
|
||||||
|
cpp/cmake_install.cmake
|
||||||
|
cpp/Makefile
|
||||||
|
cpp/CubicLagrangeMinimize*
|
||||||
|
|
@ -7,7 +7,7 @@ set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
# Find the Eigen library
|
# Find the Eigen library
|
||||||
find_package(Eigen3 REQUIRED)
|
find_package(Eigen3 REQUIRED)
|
||||||
include_directories(${EIGEN3_INCLUDE_DIRS})
|
include_directories(${EIGEN3_INCLUDE_DIRS} include)
|
||||||
|
|
||||||
# Add the source files
|
# Add the source files
|
||||||
set(SOURCES
|
set(SOURCES
|
||||||
|
|
|
||||||
40
cpp/Makefile
40
cpp/Makefile
|
|
@ -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)
|
|
||||||
Loading…
Add table
Reference in a new issue