-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
dynamic_programming
to CMake lists (#1266)
* feat: add `dynamic_programming` to CMake lists * updating DIRECTORY.md * chore: fix minor doc. issues and indentation --------- Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
- Loading branch information
1 parent
2e8374e
commit b6b01a3
Showing
3 changed files
with
57 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# If necessary, use the RELATIVE flag, otherwise each source file may be listed | ||
# with full pathname. The RELATIVE flag makes it easier to extract an executable's name | ||
# automatically. | ||
|
||
file( GLOB APP_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.c ) | ||
foreach( testsourcefile ${APP_SOURCES} ) | ||
string( REPLACE ".c" "" testname ${testsourcefile} ) # File type. Example: `.c` | ||
add_executable( ${testname} ${testsourcefile} ) | ||
|
||
if(OpenMP_C_FOUND) | ||
target_link_libraries(${testname} OpenMP::OpenMP_C) | ||
endif() | ||
if(MATH_LIBRARY) | ||
target_link_libraries(${testname} ${MATH_LIBRARY}) | ||
endif() | ||
install(TARGETS ${testname} DESTINATION "bin/dynamic_programming") # Folder name. Do NOT include `<>` | ||
|
||
endforeach( testsourcefile ${APP_SOURCES} ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters