Skip to content

Commit

Permalink
Merge branch 'main' into nkoenig/remove-ign
Browse files Browse the repository at this point in the history
  • Loading branch information
nkoenig authored Aug 2, 2023
2 parents 7b509e5 + 57511b8 commit 2fa2477
Show file tree
Hide file tree
Showing 11 changed files with 340 additions and 315 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ build
build_*
*.*.sw?
.vscode
__pycache__
4 changes: 2 additions & 2 deletions sdf/1.10/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ foreach(FIL ${sdfs})

add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.xsd"
COMMAND ${RUBY} ${CMAKE_SOURCE_DIR}/tools/xmlschema.rb
ARGS -s ${CMAKE_CURRENT_SOURCE_DIR} -i ${ABS_FIL} -o ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/xmlschema.py
ARGS --sdf-dir ${CMAKE_CURRENT_SOURCE_DIR} --input-file ${ABS_FIL} --output-dir ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${ABS_FIL}
COMMENT "Running xml schema compiler on ${FIL}"
VERBATIM)
Expand Down
4 changes: 2 additions & 2 deletions sdf/1.5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ foreach(FIL ${sdfs})

add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.xsd"
COMMAND ${RUBY} ${CMAKE_SOURCE_DIR}/tools/xmlschema.rb
ARGS -s ${CMAKE_CURRENT_SOURCE_DIR} -i ${ABS_FIL} -o ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${Pyhton3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/xmlschema.py
ARGS --sdf-dir ${CMAKE_CURRENT_SOURCE_DIR} --input-file ${ABS_FIL} --output-dir ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${ABS_FIL}
COMMENT "Running xml schema compiler on ${FIL}"
VERBATIM)
Expand Down
4 changes: 2 additions & 2 deletions sdf/1.6/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ foreach(FIL ${sdfs})

add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.xsd"
COMMAND ${RUBY} ${CMAKE_SOURCE_DIR}/tools/xmlschema.rb
ARGS -s ${CMAKE_CURRENT_SOURCE_DIR} -i ${ABS_FIL} -o ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/xmlschema.py
ARGS --sdf-dir ${CMAKE_CURRENT_SOURCE_DIR} --input-file ${ABS_FIL} --output-dir ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${ABS_FIL}
COMMENT "Running xml schema compiler on ${FIL}"
VERBATIM)
Expand Down
4 changes: 2 additions & 2 deletions sdf/1.7/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ foreach(FIL ${sdfs})

add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.xsd"
COMMAND ${RUBY} ${CMAKE_SOURCE_DIR}/tools/xmlschema.rb
ARGS -s ${CMAKE_CURRENT_SOURCE_DIR} -i ${ABS_FIL} -o ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/xmlschema.py
ARGS --sdf-dir ${CMAKE_CURRENT_SOURCE_DIR} --input-file ${ABS_FIL} --output-dir ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${ABS_FIL}
COMMENT "Running xml schema compiler on ${FIL}"
VERBATIM)
Expand Down
4 changes: 2 additions & 2 deletions sdf/1.8/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ foreach(FIL ${sdfs})

add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.xsd"
COMMAND ${RUBY} ${CMAKE_SOURCE_DIR}/tools/xmlschema.rb
ARGS -s ${CMAKE_CURRENT_SOURCE_DIR} -i ${ABS_FIL} -o ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/xmlschema.py
ARGS --sdf-dir ${CMAKE_CURRENT_SOURCE_DIR} --input-file ${ABS_FIL} --output-dir ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${ABS_FIL}
COMMENT "Running xml schema compiler on ${FIL}"
VERBATIM)
Expand Down
4 changes: 2 additions & 2 deletions sdf/1.9/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ foreach(FIL ${sdfs})

add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.xsd"
COMMAND ${RUBY} ${CMAKE_SOURCE_DIR}/tools/xmlschema.rb
ARGS -s ${CMAKE_CURRENT_SOURCE_DIR} -i ${ABS_FIL} -o ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/xmlschema.py
ARGS --sdf-dir ${CMAKE_CURRENT_SOURCE_DIR} --input-file ${ABS_FIL} --output-dir ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${ABS_FIL}
COMMENT "Running xml schema compiler on ${FIL}"
VERBATIM)
Expand Down
2 changes: 1 addition & 1 deletion src/Types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ std::string JoinName(
const std::string &internal::SdfScopeDelimiter()
{
static const gz::utils::NeverDestroyed<std::string> delimiter{
std::string()};
kScopeDelimiter};
return delimiter.Access();
}
}
Expand Down
10 changes: 10 additions & 0 deletions src/Types_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ TEST(Types, ErrorsOutputStream)
EXPECT_EQ(expected, output.str());
}

/////////////////////////////////////////////////
TEST(Types, SplitName)
{
{
Expand Down Expand Up @@ -159,6 +160,7 @@ TEST(Types, SplitName)
}
}

/////////////////////////////////////////////////
TEST(Types, JoinName)
{
{
Expand Down Expand Up @@ -198,3 +200,11 @@ TEST(Types, JoinName)
EXPECT_EQ(joinedName, "");
}
}

/////////////////////////////////////////////////
TEST(Types, ScopeDelimiters)
{
GZ_UTILS_WARN_IGNORE__DEPRECATED_DECLARATION
EXPECT_EQ(sdf::kScopeDelimiter, sdf::kSdfScopeDelimiter);
GZ_UTILS_WARN_RESUME__DEPRECATED_DECLARATION
}
Loading

0 comments on commit 2fa2477

Please sign in to comment.