forked from anmol098/algorithms_and_data_structures
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
30 lines (26 loc) · 803 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
cmake_minimum_required (VERSION 2.6)
project (anAlgoProbAday)
#dirctory headers
include_directories("include")
include_directories(".")
#Files
file(GLOB SOURCES "./*/*.cpp")
#compile flags
set(CMAKE_CXX_FLAGS "-Wall -std=c++11 -g -pedantic")
foreach( sourcefile ${SOURCES} )
get_filename_component( demo_name ${sourcefile} NAME_WE )
if (${demo_name} STREQUAL "pstring")
add_library(pstring ${sourcefile})
continue()
endif()
if (${demo_name} STREQUAL "pUnitTest")
add_library(pUnitTest ${sourcefile})
continue()
endif()
add_executable( ${demo_name} ${sourcefile} )
if (${demo_name} STREQUAL "pstring_test")
target_link_libraries (${demo_name} pstring pUnitTest)
endif()
continue()
endif()
endforeach( sourcefile ${SOURCES} )