Skip to content

Commit 32e894d

Browse files
authored
Merge pull request #16 from p1v0t/buildscript
Use better build script
2 parents 9f25a0f + 032e0ca commit 32e894d

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

CMakeLists.txt

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
1-
# CMake entry point
21
cmake_minimum_required (VERSION 3.5)
3-
project (memory-allocators)
2+
project (memory-allocators LANGUAGES CXX)
43

5-
## Add headers files
6-
include_directories (
7-
includes/
8-
)
4+
set(SOURCES src/Allocator.cpp
5+
src/CAllocator.cpp
6+
src/LinearAllocator.cpp
7+
src/StackAllocator
8+
src/PoolAllocator
9+
src/FreeListAllocator.cpp
10+
src/Benchmark.cpp
11+
src/main.cpp)
912

10-
11-
set(SOURCES src/Allocator.cpp src/CAllocator.cpp src/LinearAllocator.cpp src/StackAllocator src/PoolAllocator src/FreeListAllocator.cpp src/Benchmark.cpp src/main.cpp)
12-
13-
add_compile_options(
14-
-std=c++11
15-
# -D_DEBUG
16-
# -g
17-
)
18-
19-
# main.cpp
2013
add_executable(main ${SOURCES})
21-
target_link_libraries(main)
14+
target_include_directories(main PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/includes)
15+
target_compile_features(main PRIVATE cxx_std_11)

0 commit comments

Comments
 (0)