CMakeLists.txt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. find_package(Check REQUIRED)
  2. find_package(Threads REQUIRED)
  3. set(LIBS ${CHECK_LIBRARIES})
  4. if(NOT WIN32)
  5. list(APPEND LIBS rt pthread)
  6. endif(NOT WIN32)
  7. if(MULTITHREADING)
  8. list(APPEND LIBS urcu-cds urcu urcu-common)
  9. endif(MULTITHREADING)
  10. # the unit test are built directly on the open62541 object files. so they can
  11. # access symbols that are hidden/not exported to the shared library
  12. add_executable(check_builtin $<TARGET_OBJECTS:open62541-objects> check_builtin.c)
  13. target_link_libraries(check_builtin ${LIBS})
  14. add_test(builtin ${CMAKE_CURRENT_BINARY_DIR}/check_builtin)
  15. add_executable(check_memory $<TARGET_OBJECTS:open62541-objects> check_memory.c)
  16. target_link_libraries(check_memory ${LIBS})
  17. add_test(memory ${CMAKE_CURRENT_BINARY_DIR}/check_memory)
  18. # add_executable(check_stack check_stack.c)
  19. # target_link_libraries(check_stack ${LIBS})
  20. # add_test(stack ${CMAKE_CURRENT_BINARY_DIR}/check_stack)
  21. # add_executable(check_base64 check_base64.c)
  22. # target_link_libraries(check_base64 ${LIBS})
  23. # add_test(base64 ${CMAKE_CURRENT_BINARY_DIR}/check_base64)
  24. add_executable(check_services_view $<TARGET_OBJECTS:open62541-objects> check_services_view.c)
  25. target_link_libraries(check_services_view ${LIBS})
  26. add_test(services_view ${CMAKE_CURRENT_BINARY_DIR}/check_services_view)
  27. add_executable(check_nodestore $<TARGET_OBJECTS:open62541-objects> check_nodestore.c)
  28. target_link_libraries(check_nodestore ${LIBS})
  29. add_test(nodestore ${CMAKE_CURRENT_BINARY_DIR}/check_nodestore)
  30. # add_executable(check_startup check_startup.c)
  31. # target_link_libraries(check_startup ${LIBS})
  32. # add_test(startup ${CMAKE_CURRENT_BINARY_DIR}/check_startup)