create and link object file

This commit is contained in:
Krishna Vedala
2020-06-06 10:44:02 -04:00
parent ff6cb07b9c
commit 30cf80c35d

View File

@@ -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")