Skip to content

Commit 60310de

Browse files
feat: add process_scheduling_algorithms to CMake (#1193)
* Update CMakeLists.txt * Create CMakeLists.txt Co-authored-by: David Leal <[email protected]>
1 parent b8a8807 commit 60310de

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ add_subdirectory(conversions)
6161
add_subdirectory(client_server)
6262
add_subdirectory(project_euler)
6363
add_subdirectory(machine_learning)
64+
add_subdirectory(process_scheduling_algorithms)
6465
add_subdirectory(numerical_methods)
6566

6667
## Configure Doxygen documentation system
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# If necessary, use the RELATIVE flag, otherwise each source file may be listed
2+
# with full pathname. RELATIVE may makes it easier to extract an executable name
3+
# automatically.
4+
file( GLOB APP_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.c )
5+
# file( GLOB APP_SOURCES ${CMAKE_SOURCE_DIR}/*.c )
6+
# AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} APP_SOURCES)
7+
foreach( testsourcefile ${APP_SOURCES} )
8+
# I used a simple string replace, to cut off .cpp.
9+
string( REPLACE ".c" "" testname ${testsourcefile} )
10+
add_executable( ${testname} ${testsourcefile} )
11+
12+
if(OpenMP_C_FOUND)
13+
target_link_libraries(${testname} OpenMP::OpenMP_C)
14+
endif()
15+
if(MATH_LIBRARY)
16+
target_link_libraries(${testname} ${MATH_LIBRARY})
17+
endif()
18+
install(TARGETS ${testname} DESTINATION "bin/process_scheduling_algorithms")
19+
20+
endforeach( testsourcefile ${APP_SOURCES} )

0 commit comments

Comments
 (0)