mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-06-17 07:38:49 +08:00
create and link object file
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
add_library(libstack OBJECT stack.h stack.cpp)
|
||||
add_executable( stack
|
||||
stack.cpp
|
||||
main.cpp
|
||||
)
|
||||
add_executable( test_stack
|
||||
stack.cpp
|
||||
target_link_libraries(stack PUBLIC libstack)
|
||||
# set_target_properties(stack PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
add_executable( test_stack
|
||||
test_stack.cpp
|
||||
)
|
||||
target_link_libraries(test_stack PUBLIC libstack)
|
||||
|
||||
install(TARGETS stack DESTINATION "bin/data_structures")
|
||||
install(TARGETS test_stack DESTINATION "bin/data_structures")
|
||||
install(FILES students.txt DESTINATION "bin/data_structures")
|
||||
|
||||
Reference in New Issue
Block a user