Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post-work (deadline: 20.01.2019) #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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(./includes)
add_definitions(-Wall -Wpedantic -Werror -Wextra)
add_executable(${PROJECT_NAME} ${SRC_LIST})
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
CXX= g++
CXXFLAGS= -std=c++17 -Wall -Wpedantic -Wextra
SOURCES= *.cpp
OBJECTS= $(SOURCES:.cpp=.o)
INCLUDES= includes/*.hpp
include_dirs= -Iincludes
all_target= debug release

.PHONY: all
all: $(all_target)

debug: $(SOURCES) $(INCLUDES)
$(CXX) $< $(CXXFLAGS) -g -o $@ $(include_dir)

release: $(SOURCES) $(INCLUDES)
$(CXX) $< $(CXXFLAGS) -O3 -o $@ $(include_dir)

.PHONY: clean
clean:
rm $(all_target)
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Shape.hpp → includes/Shape.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class Shape
{
public:
virtual ~Shape() {}
virtual ~Shape() {};

virtual double getArea() const = 0;
virtual double getPerimeter() const = 0;
Expand Down
File renamed without changes.