Skip to content

Commit bddcd1d

Browse files
committed
Fix issue with schemas that have 'SCHEMA' in comment
CMake was looking for the first line containing SCHEMA. If a comment above the SCHEMA statement contained SCHEMA, cmake would pick that line. This resulted in an invalid string for the schema name.
1 parent 5ab1344 commit bddcd1d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

data/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
6666
endif()
6767

6868
# read the schema name from a line like 'SCHEMA AUTOMOTIVE_DESIGN;'
69-
file(STRINGS ${SCHEMA_FILE} SCHEMA_STATEMENT LIMIT_COUNT 1 REGEX "SCHEMA .*")
69+
file(STRINGS ${SCHEMA_FILE} SCHEMA_STATEMENT LIMIT_COUNT 1 REGEX "^SCHEMA .*")
7070
string(REGEX REPLACE "^SCHEMA \(.*\)\;$" "\\1" SCHEMA_N ${SCHEMA_STATEMENT} )
7171
string(TOUPPER ${SCHEMA_N} SCHEMA_LONG_NAME) #fedex_plus always uses upper case for file names
7272
get_filename_component(SCHEMA_SHORT_NAME ${SCHEMA_FILE} NAME_WE)

0 commit comments

Comments
 (0)