aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/common.cmake
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-05-29 02:04:00 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-05-29 02:04:00 +0200
commitb370e2d20d131478dc593ee31a2dff5d8d3f9024 (patch)
tree4a85945f9fbf41278934286c53e845d9b15b2221 /cmake/common.cmake
parent8b76b1a089eb6e18e4b0b3e55b322f770064856b (diff)
Trick to always execute popule http and data dir
This will fake cmake to make it believe that the output produced by custom_command never exists so it have to re execute the command... Change-Id: I3836510d5c522b8f23991669eb07b08bf17aba5f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/common.cmake')
-rw-r--r--cmake/common.cmake10
1 files changed, 6 insertions, 4 deletions
diff --git a/cmake/common.cmake b/cmake/common.cmake
index 04d144f..ee95906 100644
--- a/cmake/common.cmake
+++ b/cmake/common.cmake
@@ -123,20 +123,22 @@ macro(project_targets_populate)
add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_BINDIR}/${P}${TARGET})
add_dependencies(populate ${POPULE_PACKAGE_TARGET})
elseif(${T} STREQUAL "HTDOCS")
- add_custom_command(OUTPUT ${PACKAGE_HTTPDIR}
+ add_custom_command(OUTPUT ${PACKAGE_HTTPDIR}-xx
DEPENDS ${TARGET}
COMMAND mkdir -p ${PACKAGE_HTTPDIR}
+ COMMAND touch ${PACKAGE_HTTPDIR}
COMMAND cp -r ${BD}/${P}${OUT}/* ${PACKAGE_HTTPDIR}
)
- add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_HTTPDIR})
+ add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_HTTPDIR}-xx)
add_dependencies(populate ${POPULE_PACKAGE_TARGET})
elseif(${T} STREQUAL "DATA")
- add_custom_command(OUTPUT ${PACKAGE_DATADIR}
+ add_custom_command(OUTPUT ${PACKAGE_DATADIR}-xx
DEPENDS ${TARGET}
COMMAND mkdir -p ${PACKAGE_DATADIR}
+ COMMAND touch ${PACKAGE_DATADIR}
COMMAND cp -r ${BD}/${P}${OUT} ${PACKAGE_DATADIR}
)
- add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_DATADIR})
+ add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_DATADIR}-xx)
add_dependencies(populate ${POPULE_PACKAGE_TARGET})
endif(${T} STREQUAL "BINDING")
elseif(${CMAKE_BUILD_TYPE} MATCHES "[Dd][Ee][Bb][Uu][Gg]")