From 0c93a8da8236dcb3c47fa650ad9eecb89d63b9f0 Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Wed, 12 Mar 2014 20:10:53 +0100 Subject: Switched to cmake build system --- CMakeLists.txt | 28 ++++++++++++++++++++++++++++ Makefile | 25 ------------------------- 2 files changed, 28 insertions(+), 25 deletions(-) create mode 100644 CMakeLists.txt delete mode 100644 Makefile diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..683e7d6 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 2.8) +project(CodepointIterator) + +set( + CMAKE_CXX_FLAGS + "-std=c++11 -W -Wall -Wextra -Winline -pedantic" +) + +include_directories( + src/ +) + +add_executable( + test + test.cc + src/utility.cc + src/codepoint_iterator.cc +) + +target_link_libraries( + test + gtest +) + +add_custom_command( + TARGET test + POST_BUILD COMMAND ./test +) diff --git a/Makefile b/Makefile deleted file mode 100644 index 6d82904..0000000 --- a/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -CXX = g++ -CXXFLAGS = -std=c++11 -W -Wall -Wextra -pedantic - -SRC = src/utility.cc \ - src/codepoint_iterator.cc \ - test.cc -OBJ = $(subst .cc,.o,$(SRC)) - -all: test - -test: ${OBJ} - $(CXX) -o test -lgtest $(OBJ) - ./test - -.PHONY: clean; -clean: - rm -f $(OBJ) - rm test - -depend: .depend - -.depend: $(SRC) - $(CXX) -M $(CXXFLAGS) $< > $@ - -include .depend -- cgit v1.2.3