diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-08-08 17:19:26 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-08-10 15:33:49 +0000 |
commit | d14bdceab76e81c3807e4b75c613276f9f5369b8 (patch) | |
tree | d254864e719e05ee12a859b244eb197150dac340 /cmake/cmake.d/03-macros.cmake | |
parent | 70cf8fdb919aae05088346804436f6df8ce7019d (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/cmake.d/03-macros.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() |