Merge lp:~zorba-coders/zorba/check-core-uris into lp:zorba

Proposed by Chris Hillery
Status: Merged
Approved by: Matthias Brantner
Approved revision: 10562
Merged at revision: 10568
Proposed branch: lp:~zorba-coders/zorba/check-core-uris
Merge into: lp:zorba
Diff against target: 116 lines (+37/-16)
2 files modified
CMakeLists.txt (+1/-1)
cmake_modules/ZorbaModule.cmake (+36/-15)
To merge this branch: bzr merge lp:~zorba-coders/zorba/check-core-uris
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Chris Hillery Approve
Review via email: mp+83904@code.launchpad.net

Commit message

Separate check_uris into check_core_uris and check_uris. zorbacmd depends on check_core_uris, so non-core modules may depend on zorbacmd and be assured that the Zorba executable is fully functional.

To post a comment you must log in.
Revision history for this message
Chris Hillery (ceejatec) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job check-core-uris-2011-11-30T09-54-07.597Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. Got: 1 Approve, 1 Pending.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job check-core-uris-2011-12-01T21-16-30.548Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2011-11-04 11:31:13 +0000
+++ CMakeLists.txt 2011-11-30 09:54:25 +0000
@@ -556,4 +556,4 @@
556# This dependency is zorba-only related, which is why it's added here556# This dependency is zorba-only related, which is why it's added here
557# and not within zorba-modules, which is for general use in other557# and not within zorba-modules, which is for general use in other
558# non-zorba modules.558# non-zorba modules.
559ADD_DEPENDENCIES(check_uris gen_diag_modules)559ADD_DEPENDENCIES(check_core_uris gen_diag_modules)
560560
=== modified file 'cmake_modules/ZorbaModule.cmake'
--- cmake_modules/ZorbaModule.cmake 2011-11-11 10:37:11 +0000
+++ cmake_modules/ZorbaModule.cmake 2011-11-30 09:54:25 +0000
@@ -407,16 +407,24 @@
407 IF (file_found EQUAL -1)407 IF (file_found EQUAL -1)
408 SET_PROPERTY (GLOBAL APPEND PROPERTY "${_dir_sym}-output-files"408 SET_PROPERTY (GLOBAL APPEND PROPERTY "${_dir_sym}-output-files"
409 "${_output_file}")409 "${_output_file}")
410 # Save the input file, output file, and any library dependency410 # Detect whether this is a core URI or not
411 # target for this rule in a global property411 IF (PROJECT_NAME STREQUAL "zorba")
412 SET (_is_core 1)
413 ELSE (PROJECT_NAME STREQUAL "zorba")
414 SET (_is_core 0)
415 ENDIF (PROJECT_NAME STREQUAL "zorba")
416
417 # Save the (input file, output file, any library dependency
418 # target, and whether this is a core or non-core file) for this
419 # rule in a global property
412 SET_PROPERTY (GLOBAL APPEND PROPERTY ZORBA_URI_FILES420 SET_PROPERTY (GLOBAL APPEND PROPERTY ZORBA_URI_FILES
413 "${INPUT_FILE}" "${_output_file}" "${DEPEND_TARGET}")421 "${INPUT_FILE}" "${_output_file}" "${DEPEND_TARGET}" "${_is_core}")
414422
415 # For .xq and .xsd files, also set up an INSTALL rule (if not TEST_ONLY).423 # For .xq and .xsd files, also set up an INSTALL rule (if not TEST_ONLY).
416 IF (NOT ${TEST_ONLY} EQUAL 1)424 IF (NOT ${TEST_ONLY} EQUAL 1)
417 IF (${_output_ext} STREQUAL ".xq" OR ${_output_ext} STREQUAL ".xsd")425 IF (${_output_ext} STREQUAL ".xq" OR ${_output_ext} STREQUAL ".xsd")
418 426
419 IF(NOT PROJECT_NAME STREQUAL "zorba")427 IF(NOT _is_core)
420 STRING(REPLACE "-" "_" component_name ${PROJECT_NAME}) 428 STRING(REPLACE "-" "_" component_name ${PROJECT_NAME})
421 INSTALL (FILES "${INPUT_FILE}"429 INSTALL (FILES "${INPUT_FILE}"
422 DESTINATION "${ZORBA_CORE_URI_DIR}/${_output_path}"430 DESTINATION "${ZORBA_CORE_URI_DIR}/${_output_path}"
@@ -437,11 +445,11 @@
437 FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeCPackModules.cmake "SET(CPACK_COMPONENT_${component_name2}_INSTALL_TYPES Full)\n")445 FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeCPackModules.cmake "SET(CPACK_COMPONENT_${component_name2}_INSTALL_TYPES Full)\n")
438 ENDIF (NOT ${component_name}_cpack) 446 ENDIF (NOT ${component_name}_cpack)
439 447
440 ELSE(NOT PROJECT_NAME STREQUAL "zorba")448 ELSE(NOT _is_core)
441 INSTALL (FILES "${INPUT_FILE}"449 INSTALL (FILES "${INPUT_FILE}"
442 DESTINATION "${ZORBA_NONCORE_URI_DIR}/${_output_path}"450 DESTINATION "${ZORBA_NONCORE_URI_DIR}/${_output_path}"
443 RENAME "${_output_filename}")451 RENAME "${_output_filename}")
444 ENDIF(NOT PROJECT_NAME STREQUAL "zorba")452 ENDIF(NOT _is_core)
445 453
446 454
447 455
@@ -488,16 +496,17 @@
488 IF (POLICY CMP0007)496 IF (POLICY CMP0007)
489 CMAKE_POLICY (SET CMP0007 NEW)497 CMAKE_POLICY (SET CMP0007 NEW)
490 ENDIF (POLICY CMP0007)498 ENDIF (POLICY CMP0007)
491 MESSAGE (STATUS "Creating check_uris target")499 MESSAGE (STATUS "Creating check_core_uris and check_uris targets")
492 GET_PROPERTY (copy_rules GLOBAL PROPERTY ZORBA_URI_FILES)500 GET_PROPERTY (copy_rules GLOBAL PROPERTY ZORBA_URI_FILES)
493 SET (_output_files)501 SET (_output_files)
494 WHILE (copy_rules)502 WHILE (copy_rules)
495 # Pop three items off the list, and set up the corresponding503 # Pop four items off the list, and set up the corresponding
496 # rule504 # rule
497 LIST (GET copy_rules 0 _input_file)505 LIST (GET copy_rules 0 _input_file)
498 LIST (GET copy_rules 1 _output_file)506 LIST (GET copy_rules 1 _output_file)
499 LIST (GET copy_rules 2 _depend_target)507 LIST (GET copy_rules 2 _depend_target)
500 LIST (REMOVE_AT copy_rules 0 1 2)508 LIST (GET copy_rules 3 _is_core)
509 LIST (REMOVE_AT copy_rules 0 1 2 3)
501 SET (_depends "${_input_file}")510 SET (_depends "${_input_file}")
502 IF (_depend_target)511 IF (_depend_target)
503 LIST (APPEND _depends "${_depend_target}")512 LIST (APPEND _depends "${_depend_target}")
@@ -507,12 +516,24 @@
507 "${_input_file}" "${_output_file}"516 "${_input_file}" "${_output_file}"
508 DEPENDS ${_depends}517 DEPENDS ${_depends}
509 COMMENT "Copying ${_input_file} to URI path" VERBATIM)518 COMMENT "Copying ${_input_file} to URI path" VERBATIM)
510 LIST (APPEND _output_files "${_output_file}")519 IF (_is_core)
520 LIST (APPEND _core_output_files "${_output_file}")
521 ELSE (_is_core)
522 LIST (APPEND _noncore_output_files "${_output_file}")
523 ENDIF (_is_core)
511 ENDWHILE (copy_rules)524 ENDWHILE (copy_rules)
512 ADD_CUSTOM_TARGET (check_uris ALL DEPENDS ${_output_files} VERBATIM)525
513 SET_TARGET_PROPERTIES(check_uris PROPERTIES526 # Targets and dependencies:
514 FOLDER "Modules"527 # ALL depends on check_uris; check_uris depends on check_core_uris;
515 )528 # zorbacmd depends on check_core_uris.
529 ADD_CUSTOM_TARGET (check_core_uris
530 DEPENDS ${_core_output_files} VERBATIM)
531 ADD_CUSTOM_TARGET (check_uris ALL
532 DEPENDS ${_noncore_output_files} VERBATIM)
533 ADD_DEPENDENCIES(check_uris check_core_uris)
534 ADD_DEPENDENCIES(zorbacmd check_core_uris)
535 SET_TARGET_PROPERTIES(check_core_uris PROPERTIES FOLDER "Modules")
536 SET_TARGET_PROPERTIES(check_uris PROPERTIES FOLDER "Modules")
516 SET_PROPERTY (GLOBAL PROPERTY ZORBA_URI_FILES)537 SET_PROPERTY (GLOBAL PROPERTY ZORBA_URI_FILES)
517538
518 #add 'xqdoc' and 'xqdoc-xml' targets539 #add 'xqdoc' and 'xqdoc-xml' targets
@@ -702,7 +723,7 @@
702 COMMENT "Building XQDoc XML documentation ..."723 COMMENT "Building XQDoc XML documentation ..."
703 )724 )
704 MESSAGE(STATUS " added target xqdoc-xml")725 MESSAGE(STATUS " added target xqdoc-xml")
705 ADD_DEPENDENCIES(xqdoc-xml zorbacmd zorba_simplestore check_uris)726 ADD_DEPENDENCIES(xqdoc-xml zorbacmd check_core_uris)
706727
707 SET_TARGET_PROPERTIES (xqdoc-xml PROPERTIES728 SET_TARGET_PROPERTIES (xqdoc-xml PROPERTIES
708 EXCLUDE_FROM_DEFAULT_BUILD 1729 EXCLUDE_FROM_DEFAULT_BUILD 1

Subscribers

People subscribed via source and target branches