mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
better way to link libraries
This commit is contained in:
parent
c0ebfabc6f
commit
0c86721f4a
@ -7,11 +7,12 @@ project(Algorithms_in_C
|
|||||||
|
|
||||||
add_subdirectory(function_timer EXCLUDE_FROM_ALL)
|
add_subdirectory(function_timer EXCLUDE_FROM_ALL)
|
||||||
include_directories(function_timer/include)
|
include_directories(function_timer/include)
|
||||||
link_libraries(function_timer)
|
# link_libraries(function_timer)
|
||||||
# include_directories(${CMAKE_BINARY_DIR}/include)
|
# include_directories(${CMAKE_BINARY_DIR}/include)
|
||||||
# link_directories(${CMAKE_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE})
|
# link_directories(${CMAKE_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE})
|
||||||
|
|
||||||
add_subdirectory(conversions)
|
add_subdirectory(conversions)
|
||||||
|
add_subdirectory(misc)
|
||||||
|
|
||||||
find_package(OpenMP)
|
find_package(OpenMP)
|
||||||
|
|
||||||
|
@ -9,7 +9,8 @@ foreach( testsourcefile ${APP_SOURCES} )
|
|||||||
string( REPLACE ".c" "" testname ${testsourcefile} )
|
string( REPLACE ".c" "" testname ${testsourcefile} )
|
||||||
add_executable( ${testname} ${testsourcefile} )
|
add_executable( ${testname} ${testsourcefile} )
|
||||||
# Make sure YourLib is linked to each app
|
# Make sure YourLib is linked to each app
|
||||||
# target_link_libraries( ${testname} function_timer )
|
target_link_libraries( ${testname} function_timer )
|
||||||
|
set_target_properties(${testname} PROPERTIES LINKER_LANGUAGE C)
|
||||||
install(TARGETS ${testname} DESTINATION "bin/conversions")
|
install(TARGETS ${testname} DESTINATION "bin/conversions")
|
||||||
|
|
||||||
endforeach( testsourcefile ${APP_SOURCES} )
|
endforeach( testsourcefile ${APP_SOURCES} )
|
||||||
|
Loading…
Reference in New Issue
Block a user