Skip to content

Commit

Permalink
Use better build script
Browse files Browse the repository at this point in the history
Change CMake build script with more modern version.
  • Loading branch information
adembudak committed Apr 24, 2019
1 parent 9f25a0f commit 032e0ca
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
target_include_directories(main PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/includes)
target_compile_features(main PRIVATE cxx_std_11)

0 comments on commit 032e0ca

Please sign in to comment.