From c586d765a2f5fd0ecf6da43c53315c898c9bf6bd Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sat, 27 Mar 2021 16:41:39 +0100 Subject: [PATCH] Enable compilation of part that depend on sdformat and dartsim on Windows (#12) Co-authored-by: Tobias Fischer Co-authored-by: conda-forge-linter --- .azure-pipelines/azure-pipelines-win.yml | 2 +- .ci_support/win_64_.yaml | 6 +- .github/CODEOWNERS | 2 +- .scripts/build_steps.sh | 22 +++- .scripts/logging_utils.sh | 30 +++++ .scripts/run_docker_build.sh | 6 + .scripts/run_osx_build.sh | 34 +++-- LICENSE.txt | 2 +- README.md | 6 +- conda-forge.yml | 4 + recipe/148.patch | 152 +++++++++++++++++++++++ recipe/bld.bat | 12 +- recipe/build.sh | 6 + recipe/conda_build_config.yaml | 5 + recipe/meta.yaml | 16 ++- recipe/vs2017_support.patch | 26 ++++ 16 files changed, 294 insertions(+), 37 deletions(-) create mode 100644 .scripts/logging_utils.sh create mode 100644 recipe/148.patch create mode 100644 recipe/vs2017_support.patch diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 1fd8ea1..c8ee2d3 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -5,7 +5,7 @@ jobs: - job: win pool: - vmImage: vs2017-win2016 + vmImage: windows-2019 strategy: matrix: win_64_: diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index 1d32a6f..8a75dc7 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -1,8 +1,10 @@ +c_compiler: +- vs2019 channel_sources: - conda-forge,defaults channel_targets: - conda-forge main +cxx_compiler: +- vs2019 target_platform: - win-64 -vc: -- '14' diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 598eaa2..9dd5f43 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @seanyen \ No newline at end of file +* @Tobias-Fischer @seanyen @traversaro \ No newline at end of file diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index aa9727b..522eabc 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -6,8 +6,14 @@ # benefit from the improvement. set -xeuo pipefail -export PYTHONUNBUFFERED=1 export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" +source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh + + +endgroup "Start Docker" + +startgroup "Configuring conda" +export PYTHONUNBUFFERED=1 export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" @@ -18,8 +24,9 @@ conda-build: root-dir: ${FEEDSTOCK_ROOT}/build_artifacts CONDARC +BUILD_CMD=build -conda install --yes --quiet "conda-forge-ci-setup=3" conda-build pip -c conda-forge +conda install --yes --quiet "conda-forge-ci-setup=3" conda-build pip ${GET_BOA:-} -c conda-forge # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -29,24 +36,33 @@ source run_conda_forge_build_setup # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" +endgroup "Configuring conda" if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then + startgroup "Running conda debug" if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" fi conda debug "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + endgroup "Running conda debug" # Drop into an interactive shell /bin/bash else - conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + startgroup "Running conda $BUILD_CMD" + conda $BUILD_CMD "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + endgroup "Running conda build" + startgroup "Validating outputs" validate_recipe_outputs "${FEEDSTOCK_NAME}" + endgroup "Validating outputs" if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then + startgroup "Uploading packages" upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" + endgroup "Uploading packages" fi fi diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh new file mode 100644 index 0000000..a53ef3f --- /dev/null +++ b/.scripts/logging_utils.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Provide a unified interface for the different logging +# utilities CI providers offer. If unavailable, provide +# a compatible fallback (e.g. bare `echo xxxxxx`). + +function startgroup { + # Start a foldable group of log lines + # Pass a single argument, quoted + case ${CI:-} in + azure ) + echo "##[group]$1";; + travis ) + echo "$1" + echo -en 'travis_fold:start:'"${1// /}"'\\r';; + * ) + echo "$1";; + esac +} + +function endgroup { + # End a foldable group of log lines + # Pass a single argument, quoted + case ${CI:-} in + azure ) + echo "##[endgroup]";; + travis ) + echo -en 'travis_fold:end:'"${1// /}"'\\r';; + esac +} diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 36dacd6..16d6c15 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -5,6 +5,10 @@ # changes to this script, consider a proposal to conda-smithy so that other feedstocks can also # benefit from the improvement. +source .scripts/logging_utils.sh + +startgroup "Configure Docker" + set -xeo pipefail THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" @@ -65,7 +69,9 @@ DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}" if [ -z "${CI}" ]; then DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" fi +endgroup "Configure Docker" +startgroup "Start Docker" export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" docker run ${DOCKER_RUN_ARGS} \ -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index c299b79..614ca84 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -1,29 +1,24 @@ #!/usr/bin/env bash +source .scripts/logging_utils.sh + set -x -echo -e "\n\nInstalling a fresh version of Miniforge." -if [[ ${CI} == "travis" ]]; then - echo -en 'travis_fold:start:install_miniforge\\r' -fi +startgroup "Installing a fresh version of Miniforge" MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" MINIFORGE_FILE="Miniforge3-MacOSX-x86_64.sh" curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" bash $MINIFORGE_FILE -b -if [[ ${CI} == "travis" ]]; then - echo -en 'travis_fold:end:install_miniforge\\r' -fi +endgroup "Installing a fresh version of Miniforge" -echo -e "\n\nConfiguring conda." -if [[ ${CI} == "travis" ]]; then - echo -en 'travis_fold:start:configure_conda\\r' -fi +startgroup "Configuring conda" +BUILD_CMD=build source ${HOME}/miniforge3/etc/profile.d/conda.sh conda activate base echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build." -conda install -n base --quiet --yes "conda-forge-ci-setup=3" conda-build pip +conda install -n base --quiet --yes "conda-forge-ci-setup=3" conda-build pip ${GET_BOA:-} @@ -39,19 +34,22 @@ echo -e "\n\nRunning the build setup script." source run_conda_forge_build_setup -if [[ ${CI} == "travis" ]]; then - echo -en 'travis_fold:end:configure_conda\\r' -fi +endgroup "Configuring conda" set -e -echo -e "\n\nMaking the build clobber file and running the build." +startgroup "Running conda $BUILD_CMD" +echo -e "\n\nMaking the build clobber file" make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml -conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-} +conda $BUILD_CMD ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-} +endgroup "Running conda build" +startgroup "Validating outputs" validate_recipe_outputs "${FEEDSTOCK_NAME}" +endgroup "Validating outputs" if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then - echo -e "\n\nUploading the packages." + startgroup "Uploading packages" upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml + endgroup "Uploading packages" fi \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index 5f30279..ed3f451 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ BSD 3-clause license -Copyright (c) 2015-2020, conda-forge contributors +Copyright (c) 2015-2021, conda-forge contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index 451a9b4..580d349 100644 --- a/README.md +++ b/README.md @@ -169,13 +169,15 @@ build distinct package versions. In order to produce a uniquely identifiable distribution: * If the version of a package **is not** being increased, please add or increase - the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#build-number-and-string). + the [``build/number``](https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#build-number-and-string). * If the version of a package **is** being increased, please remember to return - the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#build-number-and-string) + the [``build/number``](https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#build-number-and-string) back to 0. Feedstock Maintainers ===================== +* [@Tobias-Fischer](https://github.com/Tobias-Fischer/) * [@seanyen](https://github.com/seanyen/) +* [@traversaro](https://github.com/traversaro/) diff --git a/conda-forge.yml b/conda-forge.yml index 2989916..2cc975e 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,2 +1,6 @@ +azure: + settings_win: + pool: + vmImage: windows-2019 conda_forge_output_validation: true provider: {linux_aarch64: default, linux_ppc64le: default} diff --git a/recipe/148.patch b/recipe/148.patch new file mode 100644 index 0000000..13b3dfb --- /dev/null +++ b/recipe/148.patch @@ -0,0 +1,152 @@ +From 5c97660320a8a365c82d62279b76b8f5682c5258 Mon Sep 17 00:00:00 2001 +From: Steve Peters +Date: Wed, 7 Oct 2020 12:25:25 -0700 +Subject: [PATCH 1/2] dartsim-plugin windows build fixes + +* Build dartsim and test plugins with /permissive- with MSVC + due to https://github.com/dartsim/dart/issues/753 + +* Disable C4250 compiler warnings. + +* Create unversioned dartsim plugin by copy rather than + symlink, since symlinks require extra permissions on + Windows. This copies the TPE approach. + +Signed-off-by: Steve Peters +--- + dartsim/CMakeLists.txt | 16 ++++++++++++---- + test/plugins/CMakeLists.txt | 6 ++++++ + tpe/plugin/CMakeLists.txt | 2 +- + 3 files changed, 19 insertions(+), 5 deletions(-) + +diff --git a/dartsim/CMakeLists.txt b/dartsim/CMakeLists.txt +index 22bad22a..ca8a11cf 100644 +--- a/dartsim/CMakeLists.txt ++++ b/dartsim/CMakeLists.txt +@@ -7,6 +7,10 @@ ign_add_component(dartsim INTERFACE + + target_link_libraries(${features} INTERFACE ${DART_LIBRARIES}) + target_include_directories(${features} SYSTEM INTERFACE ${DART_INCLUDE_DIRS}) ++if (MSVC) ++ # needed by DART, see https://github.com/dartsim/dart/issues/753 ++ target_compile_options(${features} INTERFACE "/permissive-") ++endif() + + install( + DIRECTORY include/ +@@ -42,11 +46,15 @@ install(TARGETS ${dartsim_plugin} DESTINATION ${IGNITION_PHYSICS_ENGINE_INSTALL_ + set(versioned ${CMAKE_SHARED_LIBRARY_PREFIX}${dartsim_plugin}${CMAKE_SHARED_LIBRARY_SUFFIX}) + set(unversioned ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME_NO_VERSION_LOWER}-${engine_name}${CMAKE_SHARED_LIBRARY_SUFFIX}) + if (WIN32) +- # create_symlink requires cmake 3.13 on windows +- cmake_minimum_required(VERSION 3.13 FATAL_ERROR) ++ # disable MSVC inherit via dominance warning ++ target_compile_options(${dartsim_plugin} PUBLIC "/wd4250") ++ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy ++ ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR}\/${versioned} ++ ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR}\/${unversioned})") ++else() ++ EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${versioned} ${unversioned}) ++ INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR}) + endif() +-EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${versioned} ${unversioned}) +-INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR}) + + # Testing + ign_build_tests( +diff --git a/test/plugins/CMakeLists.txt b/test/plugins/CMakeLists.txt +index fa1a58a6..2358746d 100644 +--- a/test/plugins/CMakeLists.txt ++++ b/test/plugins/CMakeLists.txt +@@ -24,4 +24,10 @@ if (DART_FOUND) + target_link_libraries(MockDoublePendulum PUBLIC ${DART_LIBRARIES}) + target_compile_definitions(MockDoublePendulum PRIVATE + "IGNITION_PHYSICS_RESOURCE_DIR=\"${IGNITION_PHYSICS_RESOURCE_DIR}\"") ++ if (MSVC) ++ # needed by DART, see https://github.com/dartsim/dart/issues/753 ++ target_compile_options(MockDoublePendulum PUBLIC "/permissive-") ++ # disable MSVC inherit via dominance warning ++ target_compile_options(MockDoublePendulum PUBLIC "/wd4250") ++ endif() + endif() +diff --git a/tpe/plugin/CMakeLists.txt b/tpe/plugin/CMakeLists.txt +index 9aebeb84..b4bdf790 100644 +--- a/tpe/plugin/CMakeLists.txt ++++ b/tpe/plugin/CMakeLists.txt +@@ -43,7 +43,7 @@ if (WIN32) + # disable MSVC inherit via dominance warning + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250") + INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy +- ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR}\/${versioned} ++ ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR}\/${versioned} + ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR}\/${unversioned})") + else() + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${versioned} ${unversioned}) + +From 7482167d1d21d549a08ec0ab0ef1dc0a13dd9508 Mon Sep 17 00:00:00 2001 +From: Steve Peters +Date: Thu, 15 Oct 2020 16:52:46 -0700 +Subject: [PATCH 2/2] check_test_ran.py: windows compatibility + +Signed-off-by: Steve Peters +--- + tools/check_test_ran.py | 32 -------------------------------- + 1 file changed, 32 deletions(-) + +diff --git a/tools/check_test_ran.py b/tools/check_test_ran.py +index a6d87e6c..48169343 100755 +--- a/tools/check_test_ran.py ++++ b/tools/check_test_ran.py +@@ -44,7 +44,6 @@ + + import os + import sys +-import subprocess + + def usage(): + print("""Usage: +@@ -53,29 +52,6 @@ def usage(): + print(sys.argv) + sys.exit(getattr(os, 'EX_USAGE', 1)) + +-def run_grep(filename, arg): +- process = subprocess.Popen(['grep', arg, filename], stdout=subprocess.PIPE) +- stdout, stderr = process.communicate() +- return stdout, stderr +- +-def run_xsltproc(stylesheet, document): +- try: +- process = subprocess.Popen(['xsltproc', stylesheet, document], stdout=subprocess.PIPE) +- stdout, stderr = process.communicate() +- # Overwrite same document +- open(document, 'w').write(stdout) +- except OSError as err: +- test_name = os.path.basename(document) +- f = open(document, 'w') +- d = {'test': test_name, 'test_file': document, 'test_no_xml': test_name.replace('.xml', '')} +- f.write(""" +- +- +- +- +-"""%d) +- sys.exit(getattr(os, 'EX_USAGE', 1)) +- + def check_main(): + if len(sys.argv) < 2: + usage() +@@ -98,14 +74,6 @@ def check_main(): + + + """%d) +- sys.exit(getattr(os, 'EX_USAGE', 1)) +- +- # Checking if test is a QTest file +- stdout, stderr = run_grep(test_file, "QtVersion") +- if (stdout): +- print("Detect QTest xml file. Converting to JUNIT ...") +- stylesheet = os.path.dirname(os.path.abspath(__file__)) + "/qtest_to_junit.xslt" +- run_xsltproc(stylesheet, test_file) + + if __name__ == '__main__': + check_main() diff --git a/recipe/bld.bat b/recipe/bld.bat index 265b001..2424437 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,7 +1,3 @@ -:: MSVC is preferred. -set CC=cl.exe -set CXX=cl.exe - mkdir build cd build @@ -11,7 +7,9 @@ cmake ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^ -DCMAKE_CXX_STANDARD=17 ^ - -DBUILD_TESTING=OFF ^ + -DBUILD_TESTING=ON ^ + -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ^ + -DCMAKE_CXX_FLAGS="/permissive- /D_USE_MATH_DEFINES" ^ %SRC_DIR% if errorlevel 1 exit 1 @@ -22,3 +20,7 @@ if errorlevel 1 exit 1 :: Install. cmake --build . --config Release --target install if errorlevel 1 exit 1 + +:: Test +ctest --output-on-failure -C Release -E "check_" +if errorlevel 1 exit 1 diff --git a/recipe/build.sh b/recipe/build.sh index bc8674b..11e7c82 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -23,3 +23,9 @@ cmake .. \ cmake --build . --config Release ${NUM_PARALLEL} cmake --build . --config Release --target install ${NUM_PARALLEL} + +if [ ${target_platform} != "linux-ppc64le" ]; then + # Remove test that fail on arm64: https://github.com/ignitionrobotics/ign-physics/issues/70 + # Remove test that fail on macOS: https://github.com/conda-forge/libignition-physics-feedstock/issues/13 + ctest --output-on-failure -C Release -E "INTEGRATION_FrameSemantics2d|INTEGRATION_JointTypes2f|UNIT_Collisions_TEST|UNIT_EntityManagement_TEST|UNIT_JointFeatures_TEST|UNIT_LinkFeatures_TEST|UNIT_SDFFeatures_TEST|UNIT_SimulationFeatures_TEST" +fi diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index c3a211c..ed324e6 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -2,3 +2,8 @@ MACOSX_SDK_VERSION: # [osx and x86_64] - 10.13 # [osx and x86_64] MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64] - 10.13 # [osx and x86_64] + +c_compiler: # [win] +- vs2019 # [win] +cxx_compiler: # [win] +- vs2019 # [win] diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 598f9f1..57a7e4d 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,9 +10,12 @@ package: source: - url: https://github.com/ignitionrobotics/ign-physics/archive/ignition-physics{{ major_version }}_{{ version }}.tar.gz sha256: b8e5460d2808e20237b2ee0a6a6b7613b56412f5f6e2a5e153e48e8faae8ab77 + patches: + - vs2017_support.patch + - 148.patch build: - number: 3 + number: 4 run_exports: - {{ pin_subpackage(name, max_pin='x') }} @@ -20,6 +23,7 @@ requirements: build: - {{ compiler('cxx') }} - {{ compiler('c') }} + - clang # [win] - cmake - ninja - pkg-config @@ -28,9 +32,11 @@ requirements: - libignition-plugin1 - libignition-math6 - libignition-common3 - - libsdformat10 # [unix] + - libsdformat10 - eigen - - dartsim # [unix] + - dartsim + - libode + run: - libignition-math6 - __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx and x86_64] @@ -38,7 +44,9 @@ requirements: test: commands: - test -f ${PREFIX}/include/ignition/physics{{ major_version }}/ignition/physics.hh # [not win] - - if exist %PREFIX%\\Library\\include\\ignition\physics{{ major_version }}\ignition\physics.hh (exit 0) else (exit 1) # [win] + - test -f ${PREFIX}/lib/cmake/ignition-physics{{ major_version }}-dartsim/ignition-physics{{ major_version }}-dartsim-config.cmake # [not win] + - if not exist %PREFIX%\\Library\\include\\ignition\physics{{ major_version }}\ignition\physics.hh (exit 1) # [win] + - if not exist %PREFIX%\\Library\\lib\\cmake\\ignition-physics{{ major_version }}-dartsim\\ignition-physics{{ major_version }}-dartsim-config.cmake exit 1 # [win] about: home: https://github.com/ignitionrobotics/ign-physics diff --git a/recipe/vs2017_support.patch b/recipe/vs2017_support.patch new file mode 100644 index 0000000..d873e69 --- /dev/null +++ b/recipe/vs2017_support.patch @@ -0,0 +1,26 @@ +From 85f6d64934a0dabffd56ab2775f305575e15853e Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Sat, 27 Mar 2021 11:41:50 +0100 +Subject: [PATCH] Update CMakeLists.txt + +--- + src/CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 3df39ced..86dffa19 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -7,6 +7,12 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} + ${ignition-math${IGN_MATH_VER}_LIBRARIES} + ignition-plugin${IGN_PLUGIN_VER}::register) + ++if(MSVC) ++ target_compile_definitions(${PROJECT_LIBRARY_TARGET_NAME} ++ PUBLIC _ENABLE_EXTENDED_ALIGNED_STORAGE) ++ target_compile_options(${PROJECT_LIBRARY_TARGET_NAME} PRIVATE /permissive-) ++endif() ++ + target_include_directories(${PROJECT_LIBRARY_TARGET_NAME} + SYSTEM PUBLIC + ${EIGEN3_INCLUDE_DIRS})