-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
39 lines (22 loc) · 817 Bytes
/
CMakeLists.txt
File metadata and controls
39 lines (22 loc) · 817 Bytes
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
31
32
33
34
35
36
37
38
39
cmake_minimum_required(VERSION 3.0.0)
project(AlgorithmBasic VERSION 0.1.0)
message(STATUS "-----BEGIN------")
set(AlgorithmSrc
basicAlgorithm
)
foreach(SUB_DIR ${AlgorithmSrc})
message(STATUS "---${SUB_DIR}")
file(GLOB SRC "${CMAKE_CURRENT_SOURCE_DIR}/${SUB_DIR}/*.cpp")
message(STATUS "---all cpp: ${SRC}")
set(index 0)
foreach(CPP ${SRC})
message(STATUS "---Create Exe: ${CPP}")
MESSAGE(${CPP})
STRING(REGEX REPLACE ".+/(.+)\\..*" "\\1" FILE_NAME ${CPP})
MESSAGE(" --- FILE_NAME" ${FILE_NAME})
# add_executable(${SUB_DIR}_${index}_${FILE_NAME} ${CPP})
add_executable(${SUB_DIR}_${index} ${CPP})
math(EXPR index "${index} + 1")
endforeach(CPP)
endforeach(SUB_DIR)
message(STATUS "-----END------")