From 032e0caa2bc72f854b9dd5432e303536c56d96a6 Mon Sep 17 00:00:00 2001 From: Adem Budak Date: Thu, 25 Apr 2019 02:58:36 +0300 Subject: [PATCH] Use better build script Change CMake build script with more modern version. --- CMakeLists.txt | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ac52047..391b563 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,21 +1,15 @@ -# CMake entry point cmake_minimum_required (VERSION 3.5) -project (memory-allocators) +project (memory-allocators LANGUAGES CXX) -## Add headers files -include_directories ( - includes/ -) +set(SOURCES src/Allocator.cpp + src/CAllocator.cpp + src/LinearAllocator.cpp + src/StackAllocator + src/PoolAllocator + src/FreeListAllocator.cpp + src/Benchmark.cpp + src/main.cpp) - -set(SOURCES src/Allocator.cpp src/CAllocator.cpp src/LinearAllocator.cpp src/StackAllocator src/PoolAllocator src/FreeListAllocator.cpp src/Benchmark.cpp src/main.cpp) - -add_compile_options( - -std=c++11 -# -D_DEBUG -# -g -) - -# main.cpp add_executable(main ${SOURCES}) -target_link_libraries(main) \ No newline at end of file +target_include_directories(main PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/includes) +target_compile_features(main PRIVATE cxx_std_11) \ No newline at end of file