Refactored CMakeLists.txt

* new pip_module() macro
 * fixed exports
 * automatic gather all exports and pass them to Doxygen and PICodeParser
This commit is contained in:
2020-08-01 21:29:32 +03:00
parent 21111b3e67
commit c7ac4fa551
79 changed files with 389 additions and 531 deletions

View File

@@ -1,9 +1,10 @@
include(DownloadGTest)
macro(pip_test NAME LIBS)
gather_src("${NAME}" CPP_${NAME}_TEST _T_H _T_PH)
file(GLOB _CPPS "${NAME}/*.cpp")
file(GLOB _HDRS "${NAME}/*.h")
set(_target pip_${NAME}_test)
add_executable(${_target} ${CPP_${NAME}_TEST})
add_executable(${_target} ${_CPPS} ${_HDRS})
target_link_libraries(${_target} pip ${LIBS} gtest_main gmock_main)
add_test(NAME ${_target} COMMAND tests)
add_custom_target(${_target}_perform ALL COMMAND ${_target})