Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
project(modern_cpp)
cmake_minimum_required(VERSION 2.8)
aux_source_directory(. SRC_LIST)
include_directories(inc)
add_definitions(-Wall -Wextra -Werror)
add_executable(${PROJECT_NAME} ${SRC_LIST})
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#phony is used to specify that target is not a file
#(to avoid conflicts when there are files named clean or all)

CXX = g++
CXXFLAGS = -std=c++17 -Wall -Wextra -Werror
HEADERSFLAG = -Iinc

SRCS = *.cpp
INCS = inc/*.hpp

.PHONY: all
all: debug release

debug: $(SRCS) $(INCS)
$(CXX) $(CXXFLAGS) $(HEADERSFLAG) -g -o $@ $(SRCS)

release: $(SRCS) $(INCS)
$(CXX) $(CXXFLAGS) $(HEADERSFLAG) -O3 -o $@ $(SRCS)

.PHONY: clean
clean:
rm debug release
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.