diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-08-08 17:19:26 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-10-15 18:22:48 +0200 |
commit | 79fbc2b454a2a2da5c91adb2e4cb0b25636753a2 (patch) | |
tree | a2f7d252a60e60d5526b2d558487a9067b4f2b0d /cmake | |
parent | b4dbdc698b0b9d26bd5b6278af089f7ffb6fff5c (diff) |
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 <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/cmake.d/03-macros.cmake | 24 |
1 files 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() |