From 79fbc2b454a2a2da5c91adb2e4cb0b25636753a2 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Wed, 8 Aug 2018 17:19:26 +0200 Subject: Handles more test LABELS. You may need everything except for a binding since the afb-test binding offers the possibility to emulate other Apis. Or you can rely on platform binding if needed but developping bindings only used for testing purpose isn't a good solution and should be avoided. Change-Id: I39e1a43bbe4d73b36f0155913125f0df837d2ec5 Signed-off-by: Romain Forlot --- cmake/cmake.d/03-macros.cmake | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/cmake/cmake.d/03-macros.cmake b/cmake/cmake.d/03-macros.cmake index 835f7be..c1ed23c 100644 --- a/cmake/cmake.d/03-macros.cmake +++ b/cmake/cmake.d/03-macros.cmake @@ -348,11 +348,19 @@ macro(project_targets_populate) if(${T} STREQUAL "LIBRARY") unset(BD) generate_one_populate_target(${IMPPATH} ${PACKAGE_LIBDIR}) + elseif(${T} STREQUAL "TEST-LIBRARY") + unset(BD) + generate_one_populate_target(${IMPPATH} ${PACKAGE_TEST_LIBDIR}) elseif(${T} STREQUAL "PLUGIN") if(NOT S) set(S ".ctlso") endif() generate_one_populate_target(${P}${OUT}${S} "${PACKAGE_LIBDIR}/plugins") + elseif(NOT ${CMAKE_BUILD_TYPE} STREQUAL "RELEASE" AND ${T} STREQUAL "TEST-PLUGIN") + if(NOT S) + set(S ".ctlso") + endif() + generate_one_populate_target(${P}${OUT}${S} "${PACKAGE_TEST_LIBDIR}/plugins") elseif(${T} STREQUAL "BINDING") if(NOT S) set(S ".so") @@ -381,14 +389,26 @@ macro(project_targets_populate) else() generate_one_populate_target(${P}${OUT}${S} ${PACKAGE_BINDIR}) endif() + elseif(NOT ${CMAKE_BUILD_TYPE} STREQUAL "RELEASE" AND ${T} STREQUAL "TEST-EXECUTABLE") + if(NOT S) + set(S "") + endif() + if(NOT OUT AND IMPPATH) + unset(BD) + generate_one_populate_target(${IMPPATH} ${PACKAGE_TEST_BINDIR}) + else() + generate_one_populate_target(${P}${OUT}${S} ${PACKAGE_TEST_BINDIR}) + endif() elseif(${T} STREQUAL "HTDOCS") generate_one_populate_target(${P}${OUT} ${PACKAGE_HTTPDIR}) + elseif(NOT ${CMAKE_BUILD_TYPE} STREQUAL "RELEASE" AND ${T} STREQUAL "TEST-HTDOCS") + generate_one_populate_target(${P}${OUT} ${PACKAGE_HTTPDIR}) elseif(${T} STREQUAL "DATA" ) generate_one_populate_target(${TARGET} ${PACKAGE_DATADIR}) - elseif(${T} STREQUAL "BINDING-CONFIG" ) - generate_one_populate_target(${TARGET} ${PACKAGE_ETCDIR}) elseif(NOT ${CMAKE_BUILD_TYPE} STREQUAL "RELEASE" AND ${T} STREQUAL "TEST-DATA") generate_one_populate_target(${TARGET} ${PACKAGE_TEST_DATADIR}) + elseif(${T} STREQUAL "BINDING-CONFIG" ) + generate_one_populate_target(${TARGET} ${PACKAGE_ETCDIR}) elseif(NOT ${CMAKE_BUILD_TYPE} STREQUAL "RELEASE" AND ${T} STREQUAL "TEST-CONFIG") generate_one_populate_target(${TARGET} ${PACKAGE_TEST_ETCDIR}) endif() -- cgit 1.2.3-korg