[sdformat6] Disable test (#22970)

* [sdformat6] Disable test

* version

* Disable more test, correct options

* version

* Fix find external urdfdom

* version
This commit is contained in:
Jack·Boos·Yu 2022-02-08 13:37:36 +08:00 committed by GitHub
parent d1a87fc3ea
commit 6427bc63ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 82 additions and 5 deletions

View File

@ -0,0 +1,34 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 78e72e6..8f97304 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -252,7 +252,9 @@ else (buid_errors)
link_directories(${PROJECT_BINARY_DIR}/src)
+ if (BUILD_TESTING)
add_subdirectory(test)
+ endif()
add_subdirectory(src)
add_subdirectory(include/sdf)
add_subdirectory(sdf)
diff --git a/cmake/SDFUtils.cmake b/cmake/SDFUtils.cmake
index acd57f8..3626e68 100644
--- a/cmake/SDFUtils.cmake
+++ b/cmake/SDFUtils.cmake
@@ -119,6 +119,7 @@ endmacro()
include_directories(${PROJECT_SOURCE_DIR}/test/gtest/include)
macro (sdf_build_tests)
# Build all the tests
+ if (BUILD_TESTING)
foreach(GTEST_SOURCE_file ${ARGN})
string(REGEX REPLACE ".cc" "" BINARY_NAME ${GTEST_SOURCE_file})
set(BINARY_NAME ${TEST_TYPE}_${BINARY_NAME})
@@ -205,6 +206,7 @@ macro (sdf_build_tests)
--error-exitcode=1 --show-leak-kinds=all ${CMAKE_CURRENT_BINARY_DIR}/${BINARY_NAME})
endif()
endforeach()
+ endif()
endmacro()
#################################################

View File

@ -0,0 +1,34 @@
diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake
index 2735a07..6721de4 100644
--- a/cmake/SearchForStuff.cmake
+++ b/cmake/SearchForStuff.cmake
@@ -62,16 +62,16 @@ if (NOT PKG_CONFIG_FOUND)
if (NOT DEFINED USE_INTERNAL_URDF)
BUILD_WARNING("Couldn't find pkg-config for urdfdom, using internal copy")
set(USE_INTERNAL_URDF true)
- elseif(NOT USE_INTERNAL_URDF)
+ elseif(0)
BUILD_ERROR("Couldn't find pkg-config for urdfdom")
endif()
endif()
if (NOT DEFINED USE_INTERNAL_URDF OR NOT USE_INTERNAL_URDF)
# check for urdfdom with pkg-config
- pkg_check_modules(URDF urdfdom>=1.0)
+ find_package(urdfdom CONFIG REQUIRED)
- if (NOT URDF_FOUND)
+ if (NOT urdfdom_FOUND)
if (NOT DEFINED USE_INTERNAL_URDF)
message(STATUS "Couldn't find urdfdom >= 1.0, using internal copy")
set(USE_INTERNAL_URDF true)
@@ -80,8 +80,7 @@ if (NOT DEFINED USE_INTERNAL_URDF OR NOT USE_INTERNAL_URDF)
endif()
else()
# what am I doing here? pkg-config and cmake
- set(URDF_INCLUDE_DIRS ${URDF_INCLUDEDIR})
- set(URDF_LIBRARY_DIRS ${URDF_LIBDIR})
+ set(URDF_LIBRARIES urdfdom::urdfdom_model urdfdom::urdfdom_world urdfdom::urdfdom_sensor urdfdom::urdfdom_model_state)
endif()
endif()

View File

@ -6,6 +6,8 @@ vcpkg_from_github(
HEAD_REF sdf6
PATCHES
disable-unneeded-include-findboost.patch
fix-dependency-urdfdom.patch
disable-test.patch
)
# Ruby is required by the sdformat build process
@ -16,9 +18,10 @@ vcpkg_add_to_path(${RUBY_PATH})
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS -DBUILD_TESTING=OFF
-DUSE_EXTERNAL_URDF=ON
-DUSE_EXTERNAL_TINYXML=ON
OPTIONS
-DBUILD_TESTING=OFF
-DUSE_INTERNAL_URDF=OFF
-DUSE_EXTERNAL_TINYXML=ON
)
vcpkg_cmake_install()

View File

@ -1,9 +1,10 @@
{
"name": "sdformat6",
"version": "6.2.0",
"port-version": 5,
"port-version": 6,
"description": "Simulation Description Format (SDF) parser and description files.",
"homepage": "http://sdformat.org/",
"license": "Apache-2.0",
"supports": "!(arm | uwp)",
"dependencies": [
"boost-any",

View File

@ -6262,7 +6262,7 @@
},
"sdformat6": {
"baseline": "6.2.0",
"port-version": 5
"port-version": 6
},
"sdformat9": {
"baseline": "9.4.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "bdc0f927266aa4195c3795075c9e07c426c4556c",
"version": "6.2.0",
"port-version": 6
},
{
"git-tree": "f3ec7ce50f9e64316ed940878271ade6cea1c0e3",
"version": "6.2.0",