-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
29 lines (23 loc) · 1.05 KB
/
Copy pathCMakeLists.txt
File metadata and controls
29 lines (23 loc) · 1.05 KB
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
cmake_minimum_required(VERSION 3.8)
project("Misc-Programming")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_VERBOSE_MAKEFILE on)
# add_subdirectory("75_CodeForces") # Best
# add_subdirectory("76_CodeChef")
# add_subdirectory("77_HackerRank")
# add_subdirectory("78_HackerEarth")
# add_subdirectory("Daily Coding Programs")
file(GLOB sourceFILES src/*.cpp src/*.c)
#file(GLOB sourceFILES *.cpp *.c)
FOREACH (sourceFile ${sourceFILES})
get_filename_component(sourceFile_Path ${sourceFile} PATH)
MESSAGE(STATUS "Process file, path: ${sourceFile}")
get_filename_component(sourceFile_Name ${sourceFile} NAME)
string(REPLACE " " "_" sourceFile_Name ${sourceFile_Name})
string(REPLACE "'" "" sourceFile_Name ${sourceFile_Name})
string(REPLACE "\"" "" sourceFile_Name ${sourceFile_Name})
string(REPLACE "(" "_" sourceFile_Name ${sourceFile_Name})
string(REPLACE ")" "_" sourceFile_Name ${sourceFile_Name})
MESSAGE(STATUS "Process file, name: \"${sourceFile_Name}\"")
add_executable("${sourceFile_Name}" "${sourceFile}")
endforeach (sourceFile)