From fff849eb698cb7581a869761dcf730b7b98ecd33 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Sun, 10 Nov 2024 13:42:14 -0800 Subject: [PATCH] Attempt to fix rpath issue --- pixi.toml | 186 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 120 insertions(+), 66 deletions(-) diff --git a/pixi.toml b/pixi.toml index 955ddc235a7df..d4e2ae4332886 100644 --- a/pixi.toml +++ b/pixi.toml @@ -41,106 +41,129 @@ urdfdom = ">=4.0.0" [tasks] clean = { cmd = "rm -rf build && rm -rf .deps && rm -rf .pixi && rm pixi.lock" } -config-local = { cmd = "cmake -G Ninja -S . -B build -DDART_VERBOSE=ON -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX" } -install-local = { cmd = "cmake --install build --prefix $CONDA_PREFIX", depends_on = [ - "config_local", - "build", -] } - config = { cmd = """ cmake \ -G Ninja \ -S . \ - -B build \ + -B build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE \ -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ - -DDART_VERBOSE=$VERBOSE \ + -DDART_VERBOSE=$DART_VERBOSE \ -DDART_USE_SYSTEM_IMGUI=ON \ - -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \ - -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ - -DCMAKE_INSTALL_RPATH=$CONDA_PREFIX/lib \ - -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -""", env = { VERBOSE = "OFF", BUILD_TYPE = "Release" } } + -DCMAKE_PREFIX_PATH=$CONDA_PREFIX +""", env = { DART_VERBOSE = "OFF", BUILD_TYPE = "Release" } } + +lint-cpp = { cmd = """ + cmake \ + --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE \ + --target format +""", depends_on = ["config"] } -lint-cpp = { cmd = "cmake --build build --target format", depends_on = [ - "config", -] } lint-py = { cmd = "black . --exclude '\\..*' && isort . --skip-glob '.*'", depends_on = [ "config", ] } + lint = { depends_on = ["lint-cpp", "lint-py"] } -check-lint-cpp = { cmd = "cmake --build build --target check-format", depends_on = [ - "config", -] } + +check-lint-cpp = { cmd = """ + cmake \ + --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE \ + --target check-format +""", depends_on = ["config"] } + check-lint-py = { cmd = "black . --check --exclude '\\..*' && isort . --check --skip-glob '.*'", depends_on = [ "config", ] } + check-lint = { depends_on = ["check-lint-cpp", "check-lint-py"] } -build = { cmd = "cmake --build build -j --target all", depends_on = ["config"] } -build-tests = { cmd = "cmake --build build -j --target tests", depends_on = [ - "config", -] } -build-dartpy = { cmd = "cmake --build build -j --target dartpy", depends_on = [ +build = { cmd = """ + cmake \ + --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE \ + -j \ + --target all +""", depends_on = ["config"] } + +build-tests = { cmd = """ + cmake \ + --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE \ + -j \ + --target tests +""", depends_on = ["config"] } + +build-dartpy = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE -j --target dartpy", depends_on = [ "config", ] } -test = { cmd = "ctest --test-dir build --output-on-failure", depends_on = [ +test = { cmd = "ctest --test-dir build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE --output-on-failure", depends_on = [ "build-tests", ] } -test-dartpy = { cmd = "cmake --build build -j --target pytest", depends_on = [ + +test-dartpy = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE -j --target pytest", depends_on = [ "config", ] } -test-all = { cmd = "cmake --build build -j --target ALL", depends_on = [ + +test-all = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE -j --target ALL", depends_on = [ "config", ] } -ex-atlas-puppet = { cmd = "cmake --build build --target atlas_puppet --parallel && ./build/bin/atlas_puppet", depends_on = [ +ex-atlas-puppet = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE --target atlas_puppet --parallel && ./build/bin/atlas_puppet", depends_on = [ "config", ] } -ex-atlas-simbicon = { cmd = "cmake --build build --target atlas_simbicon --parallel && ./build/bin/atlas_simbicon", depends_on = [ + +ex-atlas-simbicon = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE --target atlas_simbicon --parallel && ./build/bin/atlas_simbicon", depends_on = [ "config", ] } -ex-hello-world = { cmd = "cmake --build build --target hello_world --parallel && ./build/bin/hello_world", depends_on = [ + +ex-hello-world = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE --target hello_world --parallel && ./build/bin/hello_world", depends_on = [ "config", ] } -bm-boxes = { cmd = "cmake --build build --target BM_INTEGRATION_boxes --parallel && ./build/bin/BM_INTEGRATION_boxes", depends_on = [ +bm-boxes = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE --target BM_INTEGRATION_boxes --parallel && ./build/bin/BM_INTEGRATION_boxes", depends_on = [ "config", ] } -bm-empty = { cmd = "cmake --build build --target BM_INTEGRATION_empty --parallel && ./build/bin/BM_INTEGRATION_empty", depends_on = [ + +bm-empty = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE --target BM_INTEGRATION_empty --parallel && ./build/bin/BM_INTEGRATION_empty", depends_on = [ "config", ] } -bm-kinematics = { cmd = "cmake --build build --target BM_INTEGRATION_kinematics --parallel && ./build/bin/BM_INTEGRATION_kinematics", depends_on = [ + +bm-kinematics = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE --target BM_INTEGRATION_kinematics --parallel && ./build/bin/BM_INTEGRATION_kinematics", depends_on = [ "config", ] } -tu-biped = { cmd = "cmake --build build --target tutorial_biped --parallel && ./build/bin/tutorial_biped", depends_on = [ +tu-biped = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE --target tutorial_biped --parallel && ./build/bin/tutorial_biped", depends_on = [ "config", ] } -tu-biped-fi = { cmd = "cmake --build build --target tutorial_biped_finished --parallel && ./build/bin/tutorial_biped_finished", depends_on = [ + +tu-biped-fi = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE --target tutorial_biped_finished --parallel && ./build/bin/tutorial_biped_finished", depends_on = [ "config", ] } -tu-collisions = { cmd = "cmake --build build --target tutorial_collisions --parallel && ./build/bin/tutorial_collisions", depends_on = [ + +tu-collisions = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE --target tutorial_collisions --parallel && ./build/bin/tutorial_collisions", depends_on = [ "config", ] } -tu-collisions-fi = { cmd = "cmake --build build --target tutorial_collisions_finished --parallel && ./build/bin/tutorial_collisions_finished", depends_on = [ + +tu-collisions-fi = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE --target tutorial_collisions_finished --parallel && ./build/bin/tutorial_collisions_finished", depends_on = [ "config", ] } -tu-dominoes = { cmd = "cmake --build build --target tutorial_dominoes --parallel && ./build/bin/tutorial_dominoes", depends_on = [ + +tu-dominoes = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE --target tutorial_dominoes --parallel && ./build/bin/tutorial_dominoes", depends_on = [ "config", ] } -tu-dominoes-fi = { cmd = "cmake --build build --target tutorial_dominoes_finished --parallel && ./build/bin/tutorial_dominoes_finished", depends_on = [ + +tu-dominoes-fi = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE --target tutorial_dominoes_finished --parallel && ./build/bin/tutorial_dominoes_finished", depends_on = [ "config", ] } -tu-multi-pendulum = { cmd = "cmake --build build --target tutorial_multi_pendulum --parallel && ./build/bin/tutorial_multi_pendulum", depends_on = [ + +tu-multi-pendulum = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE --target tutorial_multi_pendulum --parallel && ./build/bin/tutorial_multi_pendulum", depends_on = [ "config", ] } -tu-multi-pendulum-fi = { cmd = "cmake --build build --target tutorial_multi_pendulum_finished --parallel && ./build/bin/tutorial_multi_pendulum_finished", depends_on = [ + +tu-multi-pendulum-fi = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE --target tutorial_multi_pendulum_finished --parallel && ./build/bin/tutorial_multi_pendulum_finished", depends_on = [ "config", ] } -install = { cmd = "cmake --build build --target install --parallel", depends_on = [ +install = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/$BUILD_TYPE --target install --parallel", depends_on = [ "build", ] } @@ -193,7 +216,7 @@ freeglut = ">=3.2.2" config = { cmd = """ cmake \ -S . \ - -B build \ + -B build/$PIXI_ENVIRONMENT_NAME/cpp \ -G 'Visual Studio 17 2022' \ -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \ -DDART_VERBOSE=$DART_VERBOSE \ @@ -201,60 +224,91 @@ config = { cmd = """ -DBUILD_SHARED_LIBS=OFF \ -DDART_USE_SYSTEM_IMGUI=ON """, env = { DART_VERBOSE = "OFF" } } + lint-py = { cmd = "black . --exclude '\\..*' && isort . --skip-glob '.*'", depends_on = [ "config", ] } + lint = { depends_on = ["lint-py"] } + check-lint-py = { cmd = "black . --check --exclude '\\..*' && isort . --check --skip-glob '.*'", depends_on = [ "config", ] } + check-lint = { depends_on = ["check-lint-py"] } -build = { cmd = "cmake --build build --config $BUILD_TYPE -j", depends_on = [ +build = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp --config $BUILD_TYPE -j", depends_on = [ "config", ], env = { BUILD_TYPE = "OFF" } } -build-tests = { cmd = "cmake --build build --config $BUILD_TYPE -j --target tests", depends_on = [ + +build-tests = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp --config $BUILD_TYPE -j --target tests", depends_on = [ "config", ], env = { BUILD_TYPE = "OFF" } } -build-dartpy = { cmd = "cmake --build build -j --target dartpy", depends_on = [ + +build-dartpy = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp -j --target dartpy", depends_on = [ "config", ] } -test = { cmd = "ctest --test-dir build --build-config $BUILD_TYPE --output-on-failure", depends_on = [ - "build-tests", -], env = { BUILD_TYPE = "OFF" } } -test-dartpy = { cmd = "cmake --build build --config $BUILD_TYPE -j --target pytest", depends_on = [ - "config", -], env = { BUILD_TYPE = "OFF" } } -test-all = { cmd = "cmake --build build --config $BUILD_TYPE -j --target ALL", depends_on = [ - "config", -], env = { BUILD_TYPE = "OFF" } } +test = { cmd = """ + ctest \ + --test-dir build/$PIXI_ENVIRONMENT_NAME/cpp \ + --build-config $BUILD_TYPE \ + --output-on-failure + """, depends_on = ["build-tests"], env = { BUILD_TYPE = "OFF" } } -tu-biped = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_biped --parallel && build/$BUILD_TYPE/tutorial_biped.exe", depends_on = [ - "config", -], env = { BUILD_TYPE = "OFF" } } -tu-biped-fi = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_biped_finished --parallel && build/$BUILD_TYPE/tutorial_biped_finished.exe", depends_on = [ +test-dartpy = { cmd = """ + cmake \ + --build build/$PIXI_ENVIRONMENT_NAME/cpp \ + --config $BUILD_TYPE \ + -j \ + --target pytest + """, depends_on = ["config"], env = { BUILD_TYPE = "OFF" } } + +test-all = { cmd = """ + cmake \ + --build build/$PIXI_ENVIRONMENT_NAME/cpp \ + --config $BUILD_TYPE \ + -j \ + --target ALL +""", depends_on = ["config"], env = { BUILD_TYPE = "OFF" } } + +tu-biped = { cmd = """ + cmake \ + --build build/$PIXI_ENVIRONMENT_NAME/cpp \ + --config $BUILD_TYPE \ + --target tutorial_biped \ + --parallel \ + && build/$BUILD_TYPE/tutorial_biped.exe + """, depends_on = ["config"], env = { BUILD_TYPE = "OFF" } } + +tu-biped-fi = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp --config $BUILD_TYPE --target tutorial_biped_finished --parallel && build/$BUILD_TYPE/tutorial_biped_finished.exe", depends_on = [ "config", ], env = { BUILD_TYPE = "OFF" } } -tu-collisions = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_collisions --parallel && build/$BUILD_TYPE/tutorial_collisions.exe", depends_on = [ + +tu-collisions = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp --config $BUILD_TYPE --target tutorial_collisions --parallel && build/$BUILD_TYPE/tutorial_collisions.exe", depends_on = [ "config", ], env = { BUILD_TYPE = "OFF" } } -tu-collisions-fi = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_collisions_finished --parallel && build/$BUILD_TYPE/tutorial_collisions_finished.exe", depends_on = [ + +tu-collisions-fi = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp --config $BUILD_TYPE --target tutorial_collisions_finished --parallel && build/$BUILD_TYPE/tutorial_collisions_finished.exe", depends_on = [ "config", ], env = { BUILD_TYPE = "OFF" } } -tu-dominoes = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_dominoes --parallel && build/$BUILD_TYPE/tutorial_dominoes.exe", depends_on = [ + +tu-dominoes = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp --config $BUILD_TYPE --target tutorial_dominoes --parallel && build/$BUILD_TYPE/tutorial_dominoes.exe", depends_on = [ "config", ], env = { BUILD_TYPE = "OFF" } } -tu-dominoes-fi = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_dominoes_finished --parallel && build/$BUILD_TYPE/tutorial_dominoes_finished.exe", depends_on = [ + +tu-dominoes-fi = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp --config $BUILD_TYPE --target tutorial_dominoes_finished --parallel && build/$BUILD_TYPE/tutorial_dominoes_finished.exe", depends_on = [ "config", ], env = { BUILD_TYPE = "OFF" } } -tu-multi-pendulum = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_multi_pendulum --parallel && build/$BUILD_TYPE/tutorial_multi_pendulum.exe", depends_on = [ + +tu-multi-pendulum = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp --config $BUILD_TYPE --target tutorial_multi_pendulum --parallel && build/$BUILD_TYPE/tutorial_multi_pendulum.exe", depends_on = [ "config", ], env = { BUILD_TYPE = "OFF" } } -tu-multi-pendulum-fi = { cmd = "cmake --build build --config $BUILD_TYPE --target tutorial_multi_pendulum_finished --parallel && build/$BUILD_TYPE/tutorial_multi_pendulum_finished.exe", depends_on = [ + +tu-multi-pendulum-fi = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp --config $BUILD_TYPE --target tutorial_multi_pendulum_finished --parallel && build/$BUILD_TYPE/tutorial_multi_pendulum_finished.exe", depends_on = [ "config", ], env = { BUILD_TYPE = "OFF" } } -install = { cmd = "cmake --build build --config $BUILD_TYPE -j --target install", depends_on = [ +install = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp --config $BUILD_TYPE -j --target install", depends_on = [ "build", ], env = { BUILD_TYPE = "OFF" } }