chore: use latest CMake subfolder name

This commit is contained in:
David Leal 2022-12-21 09:04:33 -06:00 committed by GitHub
parent 3be7198f03
commit ad24ee1273
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -163,7 +163,7 @@ An example of how your new `CMakeLists.txt` file should look like. Note that if
file( GLOB APP_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.c )
foreach( testsourcefile ${APP_SOURCES} )
string( REPLACE ".c" "" testname ${testsourcefile} ) # File type. Example: `.c`, `.h`
string( REPLACE ".c" "" testname ${testsourcefile} ) # File type. Example: `.c`
add_executable( ${testname} ${testsourcefile} )
if(OpenMP_C_FOUND)
@ -172,7 +172,7 @@ foreach( testsourcefile ${APP_SOURCES} )
if(MATH_LIBRARY)
target_link_libraries(${testname} ${MATH_LIBRARY})
endif()
install(TARGETS ${testname} DESTINATION "bin/<foldername>") # Folder name
install(TARGETS ${testname} DESTINATION "bin/<foldername>") # Folder name. Do NOT include `<>`
endforeach( testsourcefile ${APP_SOURCES} )
```
@ -182,7 +182,7 @@ Include your new directory after the last subdirectory. Example:
```cmake
...
add_subdirectory(divide_and_conquer)
add_subdirectory(numerical_methods)
add_subdirectory(<foldername>)
```