Skip to content

Commit 758176b

Browse files
Merge branch 'master' into factorial-iterative
2 parents 6039c87 + 4aa529c commit 758176b

File tree

8 files changed

+573
-53
lines changed

8 files changed

+573
-53
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @Panquesito7 @realstealthninja

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ add_subdirectory(machine_learning)
4343
add_subdirectory(numerical_methods)
4444
add_subdirectory(graph)
4545
add_subdirectory(divide_and_conquer)
46+
add_subdirectory(games)
47+
add_subdirectory(cpu_scheduling_algorithms)
4648

4749
cmake_policy(SET CMP0054 NEW)
4850
cmake_policy(SET CMP0057 NEW)

DIRECTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@
120120
* [Tree Height](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/tree_height.cpp)
121121
* [Word Break](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/word_break.cpp)
122122

123+
## Games
124+
* [Memory Game](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/games/memory_game.cpp)
125+
123126
## Geometry
124127
* [Graham Scan Algorithm](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/geometry/graham_scan_algorithm.cpp)
125128
* [Graham Scan Functions](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/geometry/graham_scan_functions.hpp)
@@ -289,6 +292,7 @@
289292
* [Happy Number](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/others/happy_number.cpp)
290293
* [Iterative Tree Traversals](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/others/iterative_tree_traversals.cpp)
291294
* [Kadanes3](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/others/kadanes3.cpp)
295+
* [Kelvin To Celsius](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/others/kelvin_to_celsius.cpp)
292296
* [Lru Cache](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/others/lru_cache.cpp)
293297
* [Matrix Exponentiation](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/others/matrix_exponentiation.cpp)
294298
* [Palindrome Of Number](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/others/palindrome_of_number.cpp)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# If necessary, use the RELATIVE flag, otherwise each source file may be listed
2+
# with full pathname. The RELATIVE flag makes it easier to extract an executable's name
3+
# automatically.
4+
5+
file( GLOB APP_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp )
6+
foreach( testsourcefile ${APP_SOURCES} )
7+
string( REPLACE ".cpp" "" testname ${testsourcefile} ) # File type. Example: `.cpp`
8+
add_executable( ${testname} ${testsourcefile} )
9+
10+
set_target_properties(${testname} PROPERTIES LINKER_LANGUAGE CXX)
11+
if(OpenMP_CXX_FOUND)
12+
target_link_libraries(${testname} OpenMP::OpenMP_CXX)
13+
endif()
14+
install(TARGETS ${testname} DESTINATION "bin/cpu_scheduling_algorithms") # Folder name. Do NOT include `<>`
15+
16+
endforeach( testsourcefile ${APP_SOURCES} )

games/CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# If necessary, use the RELATIVE flag, otherwise each source file may be listed
2+
# with full pathname. The RELATIVE flag makes it easier to extract an executable's name
3+
# automatically.
4+
5+
file( GLOB APP_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp )
6+
foreach( testsourcefile ${APP_SOURCES} )
7+
string( REPLACE ".cpp" "" testname ${testsourcefile} ) # File type. Example: `.cpp`
8+
add_executable( ${testname} ${testsourcefile} )
9+
10+
set_target_properties(${testname} PROPERTIES LINKER_LANGUAGE CXX)
11+
if(OpenMP_CXX_FOUND)
12+
target_link_libraries(${testname} OpenMP::OpenMP_CXX)
13+
endif()
14+
install(TARGETS ${testname} DESTINATION "bin/games") # Folder name. Do NOT include `<>`
15+
16+
endforeach( testsourcefile ${APP_SOURCES} )

0 commit comments

Comments
 (0)