diff options
author | Frederic Marec <frederic.marec@iot.bzh> | 2019-07-15 09:58:39 +0200 |
---|---|---|
committer | Frederic Marec <frederic.marec@iot.bzh> | 2019-07-15 10:30:49 +0200 |
commit | bd9e1c988ec7237964c466c65792d4c77960625e (patch) | |
tree | b3ef2da57558d089074bf5ba07b57daba8d1511e | |
parent | d9af8879183501b5cec2fb3209dfe0f0a03ac3d1 (diff) |
Fix new target test-tree
Add condition in cmake command to avoid complilation error
Make test-tree target optional
Bug-AGL: SPEC-2040
Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
Change-Id: I885011afda06aaddf226932c3c4bbd9bf78d67a2
-rw-r--r-- | src/cmake/cmake.d/04-extra_targets.cmake | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/cmake/cmake.d/04-extra_targets.cmake b/src/cmake/cmake.d/04-extra_targets.cmake index 40cd610..202cfa7 100644 --- a/src/cmake/cmake.d/04-extra_targets.cmake +++ b/src/cmake/cmake.d/04-extra_targets.cmake @@ -88,47 +88,47 @@ add_custom_command(OUTPUT ${PROJECT_TEST_DIR} ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/test/CMakeLists.txt.in -DOUTFILE=${PROJECT_TEST_DIR}/CMakeLists.txt -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} - -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake || true COMMAND [ ! -f "${PROJECT_TEST_DIR}/afb-test/CMakeLists.txt" ] && ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/test/afb-test/CMakeLists.txt.in -DOUTFILE=${PROJECT_TEST_DIR}/afb-test/CMakeLists.txt -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} - -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake || true COMMAND [ ! -f "${PROJECT_TEST_DIR}/afb-test/etc/CMakeLists.txt" ] && ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/test/afb-test/etc/CMakeLists.txt.in -DOUTFILE=${PROJECT_TEST_DIR}/afb-test/etc/CMakeLists.txt -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} - -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake || true COMMAND [ ! -f "${PROJECT_TEST_DIR}/afb-test/etc/aft-agl-${PROJECT_NAME}.json" ] && ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/test/afb-test/etc/aft-agl-helloworld.json.in -DOUTFILE=${PROJECT_TEST_DIR}/afb-test/etc/aft-agl-${PROJECT_NAME}.json -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} - -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake || true COMMAND [ ! -f "${PROJECT_TEST_DIR}/afb-test/fixtures/CMakeLists.txt" ] && ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/test/afb-test/fixtures/CMakeLists.txt.in -DOUTFILE=${PROJECT_TEST_DIR}/afb-test/fixtures/CMakeLists.txt -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} - -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake || true COMMAND [ ! -f "${PROJECT_TEST_DIR}/afb-test/fixtures/mapi_${PROJECT_NAME}.lua" ] && ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/test/afb-test/fixtures/mapi_helloworld.lua.in -DOUTFILE=${PROJECT_TEST_DIR}/afb-test/fixtures/mapi_${PROJECT_NAME}.lua -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} - -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake || true COMMAND [ ! -f "${PROJECT_TEST_DIR}/afb-test/tests/CMakeLists.txt" ] && ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/test/afb-test/tests/CMakeLists.txt.in -DOUTFILE=${PROJECT_TEST_DIR}/afb-test/tests/CMakeLists.txt -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} - -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake || true COMMAND [ ! -f "${PROJECT_TEST_DIR}/afb-test/tests/${PROJECT_NAME}.lua" ] && ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/test/afb-test/tests/helloworld.lua.in -DOUTFILE=${PROJECT_TEST_DIR}/afb-test/tests/${PROJECT_NAME}.lua -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} - -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake || true COMMAND [ ! -f "${PROJECT_TEST_DIR}/afb-test/tests/mapi_tests.lua" ] && ${CMAKE_COMMAND} -DINFILE=${TEMPLATE_DIR}/test/afb-test/tests/mapi_tests.lua.in -DOUTFILE=${PROJECT_TEST_DIR}/afb-test/tests/mapi_tests.lua -DPROJECT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} - -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake + -P ${PROJECT_APP_TEMPLATES_DIR}/cmake/configure_file.cmake || true ) -add_custom_target(test-tree ALL DEPENDS ${PROJECT_TEST_DIR})
\ No newline at end of file +add_custom_target(test-tree DEPENDS ${PROJECT_TEST_DIR})
\ No newline at end of file |