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
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2011-11-04 11:31:13 +0000
3+++ CMakeLists.txt 2011-11-30 09:54:25 +0000
4@@ -556,4 +556,4 @@
5 # This dependency is zorba-only related, which is why it's added here
6 # and not within zorba-modules, which is for general use in other
7 # non-zorba modules.
8-ADD_DEPENDENCIES(check_uris gen_diag_modules)
9+ADD_DEPENDENCIES(check_core_uris gen_diag_modules)
10
11=== modified file 'cmake_modules/ZorbaModule.cmake'
12--- cmake_modules/ZorbaModule.cmake 2011-11-11 10:37:11 +0000
13+++ cmake_modules/ZorbaModule.cmake 2011-11-30 09:54:25 +0000
14@@ -407,16 +407,24 @@
15 IF (file_found EQUAL -1)
16 SET_PROPERTY (GLOBAL APPEND PROPERTY "${_dir_sym}-output-files"
17 "${_output_file}")
18- # Save the input file, output file, and any library dependency
19- # target for this rule in a global property
20+ # Detect whether this is a core URI or not
21+ IF (PROJECT_NAME STREQUAL "zorba")
22+ SET (_is_core 1)
23+ ELSE (PROJECT_NAME STREQUAL "zorba")
24+ SET (_is_core 0)
25+ ENDIF (PROJECT_NAME STREQUAL "zorba")
26+
27+ # Save the (input file, output file, any library dependency
28+ # target, and whether this is a core or non-core file) for this
29+ # rule in a global property
30 SET_PROPERTY (GLOBAL APPEND PROPERTY ZORBA_URI_FILES
31- "${INPUT_FILE}" "${_output_file}" "${DEPEND_TARGET}")
32+ "${INPUT_FILE}" "${_output_file}" "${DEPEND_TARGET}" "${_is_core}")
33
34 # For .xq and .xsd files, also set up an INSTALL rule (if not TEST_ONLY).
35 IF (NOT ${TEST_ONLY} EQUAL 1)
36 IF (${_output_ext} STREQUAL ".xq" OR ${_output_ext} STREQUAL ".xsd")
37
38- IF(NOT PROJECT_NAME STREQUAL "zorba")
39+ IF(NOT _is_core)
40 STRING(REPLACE "-" "_" component_name ${PROJECT_NAME})
41 INSTALL (FILES "${INPUT_FILE}"
42 DESTINATION "${ZORBA_CORE_URI_DIR}/${_output_path}"
43@@ -437,11 +445,11 @@
44 FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeCPackModules.cmake "SET(CPACK_COMPONENT_${component_name2}_INSTALL_TYPES Full)\n")
45 ENDIF (NOT ${component_name}_cpack)
46
47- ELSE(NOT PROJECT_NAME STREQUAL "zorba")
48+ ELSE(NOT _is_core)
49 INSTALL (FILES "${INPUT_FILE}"
50 DESTINATION "${ZORBA_NONCORE_URI_DIR}/${_output_path}"
51 RENAME "${_output_filename}")
52- ENDIF(NOT PROJECT_NAME STREQUAL "zorba")
53+ ENDIF(NOT _is_core)
54
55
56
57@@ -488,16 +496,17 @@
58 IF (POLICY CMP0007)
59 CMAKE_POLICY (SET CMP0007 NEW)
60 ENDIF (POLICY CMP0007)
61- MESSAGE (STATUS "Creating check_uris target")
62+ MESSAGE (STATUS "Creating check_core_uris and check_uris targets")
63 GET_PROPERTY (copy_rules GLOBAL PROPERTY ZORBA_URI_FILES)
64 SET (_output_files)
65 WHILE (copy_rules)
66- # Pop three items off the list, and set up the corresponding
67+ # Pop four items off the list, and set up the corresponding
68 # rule
69 LIST (GET copy_rules 0 _input_file)
70 LIST (GET copy_rules 1 _output_file)
71 LIST (GET copy_rules 2 _depend_target)
72- LIST (REMOVE_AT copy_rules 0 1 2)
73+ LIST (GET copy_rules 3 _is_core)
74+ LIST (REMOVE_AT copy_rules 0 1 2 3)
75 SET (_depends "${_input_file}")
76 IF (_depend_target)
77 LIST (APPEND _depends "${_depend_target}")
78@@ -507,12 +516,24 @@
79 "${_input_file}" "${_output_file}"
80 DEPENDS ${_depends}
81 COMMENT "Copying ${_input_file} to URI path" VERBATIM)
82- LIST (APPEND _output_files "${_output_file}")
83+ IF (_is_core)
84+ LIST (APPEND _core_output_files "${_output_file}")
85+ ELSE (_is_core)
86+ LIST (APPEND _noncore_output_files "${_output_file}")
87+ ENDIF (_is_core)
88 ENDWHILE (copy_rules)
89- ADD_CUSTOM_TARGET (check_uris ALL DEPENDS ${_output_files} VERBATIM)
90- SET_TARGET_PROPERTIES(check_uris PROPERTIES
91- FOLDER "Modules"
92- )
93+
94+ # Targets and dependencies:
95+ # ALL depends on check_uris; check_uris depends on check_core_uris;
96+ # zorbacmd depends on check_core_uris.
97+ ADD_CUSTOM_TARGET (check_core_uris
98+ DEPENDS ${_core_output_files} VERBATIM)
99+ ADD_CUSTOM_TARGET (check_uris ALL
100+ DEPENDS ${_noncore_output_files} VERBATIM)
101+ ADD_DEPENDENCIES(check_uris check_core_uris)
102+ ADD_DEPENDENCIES(zorbacmd check_core_uris)
103+ SET_TARGET_PROPERTIES(check_core_uris PROPERTIES FOLDER "Modules")
104+ SET_TARGET_PROPERTIES(check_uris PROPERTIES FOLDER "Modules")
105 SET_PROPERTY (GLOBAL PROPERTY ZORBA_URI_FILES)
106
107 #add 'xqdoc' and 'xqdoc-xml' targets
108@@ -702,7 +723,7 @@
109 COMMENT "Building XQDoc XML documentation ..."
110 )
111 MESSAGE(STATUS " added target xqdoc-xml")
112- ADD_DEPENDENCIES(xqdoc-xml zorbacmd zorba_simplestore check_uris)
113+ ADD_DEPENDENCIES(xqdoc-xml zorbacmd check_core_uris)
114
115 SET_TARGET_PROPERTIES (xqdoc-xml PROPERTIES
116 EXCLUDE_FROM_DEFAULT_BUILD 1

Subscribers

People subscribed via source and target branches