dominichofer / DeePC

MIT License
3 stars 0 forks source link

add sudo make install option #28

Closed marvin-ad-martianum closed 1 week ago

marvin-ad-martianum commented 3 weeks ago

could you add the sudo make install option for linux systems? specifically ubuntu 24.10 to be compatible with ros2 jazzy

dominichofer commented 3 weeks ago

The provided CMakeLists.txt should be able to generate a Makefile containing this. Have you tried cmake -B build and make -C build install?

marvin-ad-martianum commented 3 weeks ago

marvin@marvin-X1-Y4:~/ros2_ws/src/printhead_nematx/external_resources/DeePC$ sudo make -C build install [sudo] password for marvin: make: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[1]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 2%] Built target gtest make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 4%] Built target gmock make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 5%] Built target gmock_main make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 7%] Built target gtest_main make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 25%] Built target benchmark make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 27%] Built target benchmark_main make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 29%] Built target output_test_helper make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 31%] Built target benchmark_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 33%] Built target spec_arg_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 35%] Built target spec_arg_verbosity_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 37%] Built target benchmark_setup_teardown_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 39%] Built target filter_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 41%] Built target benchmark_min_time_flag_time_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 43%] Built target benchmark_min_time_flag_iters_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 45%] Built target options_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 47%] Built target basic_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 49%] Built target repetitions_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 51%] Built target diagnostics_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 53%] Built target skip_with_error_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 55%] Built target donotoptimize_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 57%] Built target fixture_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 59%] Built target register_benchmark_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 61%] Built target map_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 62%] Built target multiple_ranges_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 64%] Built target args_product_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 66%] Built target link_main_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 67%] Built target reporter_output_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 69%] Built target templated_fixture_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 71%] Built target user_counters_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 73%] Built target perf_counters_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 75%] Built target internal_threading_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 77%] Built target report_aggregates_only_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 79%] Built target display_aggregates_only_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 81%] Built target user_counters_tabular_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 83%] Built target user_counters_thousands_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 85%] Built target memory_manager_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 87%] Built target profiler_manager_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 89%] Built target cxx03_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 90%] Built target complexity_test make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [ 95%] Built target DeePCpp make[2]: Entering directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' make[2]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' [100%] Built target DeePCppTest make[1]: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build' Install the project... -- Install configuration: "" -- Up-to-date: /usr/local/include -- Installing: /usr/local/include/gmock -- Installing: /usr/local/include/gmock/gmock-cardinalities.h -- Installing: /usr/local/include/gmock/gmock-spec-builders.h -- Installing: /usr/local/include/gmock/gmock-actions.h -- Installing: /usr/local/include/gmock/gmock-nice-strict.h -- Installing: /usr/local/include/gmock/gmock-more-actions.h -- Installing: /usr/local/include/gmock/gmock-function-mocker.h -- Installing: /usr/local/include/gmock/gmock.h -- Installing: /usr/local/include/gmock/gmock-matchers.h -- Installing: /usr/local/include/gmock/internal -- Installing: /usr/local/include/gmock/internal/gmock-pp.h -- Installing: /usr/local/include/gmock/internal/custom -- Installing: /usr/local/include/gmock/internal/custom/README.md -- Installing: /usr/local/include/gmock/internal/custom/gmock-generated-actions.h -- Installing: /usr/local/include/gmock/internal/custom/gmock-port.h -- Installing: /usr/local/include/gmock/internal/custom/gmock-matchers.h -- Installing: /usr/local/include/gmock/internal/gmock-port.h -- Installing: /usr/local/include/gmock/internal/gmock-internal-utils.h -- Installing: /usr/local/include/gmock/gmock-more-matchers.h -- Installing: /usr/local/lib/libgmock.a -- Installing: /usr/local/lib/libgmock_main.a -- Installing: /usr/local/lib/pkgconfig/gmock.pc -- Installing: /usr/local/lib/pkgconfig/gmock_main.pc -- Installing: /usr/local/lib/cmake/GTest/GTestTargets.cmake -- Installing: /usr/local/lib/cmake/GTest/GTestTargets-noconfig.cmake -- Installing: /usr/local/lib/cmake/GTest/GTestConfigVersion.cmake -- Installing: /usr/local/lib/cmake/GTest/GTestConfig.cmake -- Up-to-date: /usr/local/include -- Installing: /usr/local/include/gtest -- Installing: /usr/local/include/gtest/gtest.h -- Installing: /usr/local/include/gtest/gtest-matchers.h -- Installing: /usr/local/include/gtest/gtest-typed-test.h -- Installing: /usr/local/include/gtest/gtest-test-part.h -- Installing: /usr/local/include/gtest/gtest_prod.h -- Installing: /usr/local/include/gtest/gtest-printers.h -- Installing: /usr/local/include/gtest/gtest-param-test.h -- Installing: /usr/local/include/gtest/gtest-spi.h -- Installing: /usr/local/include/gtest/gtest-assertion-result.h -- Installing: /usr/local/include/gtest/gtest-message.h -- Installing: /usr/local/include/gtest/gtest-death-test.h -- Installing: /usr/local/include/gtest/gtest_pred_impl.h -- Installing: /usr/local/include/gtest/internal -- Installing: /usr/local/include/gtest/internal/gtest-port.h -- Installing: /usr/local/include/gtest/internal/gtest-string.h -- Installing: /usr/local/include/gtest/internal/gtest-param-util.h -- Installing: /usr/local/include/gtest/internal/gtest-internal.h -- Installing: /usr/local/include/gtest/internal/gtest-death-test-internal.h -- Installing: /usr/local/include/gtest/internal/custom -- Installing: /usr/local/include/gtest/internal/custom/gtest-port.h -- Installing: /usr/local/include/gtest/internal/custom/gtest.h -- Installing: /usr/local/include/gtest/internal/custom/README.md -- Installing: /usr/local/include/gtest/internal/custom/gtest-printers.h -- Installing: /usr/local/include/gtest/internal/gtest-type-util.h -- Installing: /usr/local/include/gtest/internal/gtest-port-arch.h -- Installing: /usr/local/include/gtest/internal/gtest-filepath.h -- Installing: /usr/local/lib/libgtest.a -- Installing: /usr/local/lib/libgtest_main.a -- Installing: /usr/local/lib/pkgconfig/gtest.pc -- Installing: /usr/local/lib/pkgconfig/gtest_main.pc -- Installing: /usr/local/lib/libbenchmark.a -- Installing: /usr/local/lib/libbenchmark_main.a -- Installing: /usr/local/include/benchmark -- Installing: /usr/local/include/benchmark/export.h -- Installing: /usr/local/include/benchmark/benchmark.h -- Installing: /usr/local/lib/cmake/benchmark/benchmarkConfig.cmake -- Installing: /usr/local/lib/cmake/benchmark/benchmarkConfigVersion.cmake -- Installing: /usr/local/lib/pkgconfig/benchmark.pc -- Installing: /usr/local/lib/pkgconfig/benchmark_main.pc -- Installing: /usr/local/lib/cmake/benchmark/benchmarkTargets.cmake -- Installing: /usr/local/lib/cmake/benchmark/benchmarkTargets-noconfig.cmake -- Installing: /usr/local/share/doc/benchmark -- Installing: /usr/local/share/doc/benchmark/tools.md -- Installing: /usr/local/share/doc/benchmark/dependencies.md -- Installing: /usr/local/share/doc/benchmark/perf_counters.md -- Installing: /usr/local/share/doc/benchmark/AssemblyTests.md -- Installing: /usr/local/share/doc/benchmark/platform_specific_build_instructions.md -- Installing: /usr/local/share/doc/benchmark/python_bindings.md -- Installing: /usr/local/share/doc/benchmark/assets -- Installing: /usr/local/share/doc/benchmark/assets/images -- Installing: /usr/local/share/doc/benchmark/assets/images/icon.xcf -- Installing: /usr/local/share/doc/benchmark/assets/images/icon.png -- Installing: /usr/local/share/doc/benchmark/assets/images/icon_black.xcf -- Installing: /usr/local/share/doc/benchmark/assets/images/icon_black.png -- Installing: /usr/local/share/doc/benchmark/index.md -- Installing: /usr/local/share/doc/benchmark/_config.yml -- Installing: /usr/local/share/doc/benchmark/releasing.md -- Installing: /usr/local/share/doc/benchmark/user_guide.md -- Installing: /usr/local/share/doc/benchmark/reducing_variance.md -- Installing: /usr/local/share/doc/benchmark/random_interleaving.md make: Leaving directory '/home/marvin/ros2_ws/src/printhead_nematx/external_resources/DeePC/build'

marvin-ad-martianum commented 3 weeks ago

Seems to work. Add it to the readme maybe? and include instructions for a project using this?

dominichofer commented 3 weeks ago

There's extensive documentation at https://cmake.org/ and https://www.gnu.org/software/make/. I'm going to add the links to them in https://github.com/dominichofer/DeePC/pull/29. Would you have found the info you needed with the added links?

marvin-ad-martianum commented 3 weeks ago

yea. i wasn't thinking of limited documentation, just convenience for the next engineer (not programmer) trying to integrate this library. copy paste and automatic install are always great to have. you are right that technically none of this is needed.

dominichofer commented 1 week ago

I added this to the README: To install the library, execute make -C build install. To list more options of make, see make --help.