From 206712f046eae74f71620034ce8bc2260624ad65 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Thu, 17 Dec 2020 23:06:37 +0100 Subject: [PATCH] build: Library renamed to mp::units --- .github/workflows/ci-test-package-cmake.yml | 108 ++++++++++++++++++ CMakeLists.txt | 2 +- cmake/documentation.cmake | 1 + cmake/install.cmake | 81 ------------- cmake/static_analysis.cmake | 1 + cmake/warnings.cmake | 2 + conanfile.py | 11 +- docs/CMakeLists.txt | 10 +- docs/usage.rst | 4 +- example/CMakeLists.txt | 4 +- example/alternative_namespaces/CMakeLists.txt | 4 +- src/CMakeLists.txt | 28 +++-- .../mp-unitsConfig.cmake | 3 +- test/CMakeLists.txt | 2 +- test/metabench/CMakeLists.txt | 2 +- test/metabench/list/CMakeLists.txt | 2 +- test/metabench/make_dimension/CMakeLists.txt | 2 +- test/metabench/ratio/CMakeLists.txt | 2 +- test/unit_test/runtime/CMakeLists.txt | 4 +- test/unit_test/static/CMakeLists.txt | 4 +- test_package/CMakeLists.txt | 4 +- 21 files changed, 166 insertions(+), 115 deletions(-) create mode 100644 .github/workflows/ci-test-package-cmake.yml delete mode 100644 cmake/install.cmake rename cmake/mp-units-config.cmake.in => src/mp-unitsConfig.cmake (94%) diff --git a/.github/workflows/ci-test-package-cmake.yml b/.github/workflows/ci-test-package-cmake.yml new file mode 100644 index 00000000..54d285d7 --- /dev/null +++ b/.github/workflows/ci-test-package-cmake.yml @@ -0,0 +1,108 @@ +# The MIT License (MIT) +# +# Copyright (c) 2018 Mateusz Pusz +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +name: mp-units CMake Test Package CI + +on: + push: + paths-ignore: + - 'docs/**' + - 'example/**' + - 'test/**' + pull_request: + paths-ignore: + - 'docs/**' + - 'example/**' + - 'test/**' + +env: + CC: gcc-10 + CXX: g++-10 + +jobs: + setup: + name: Environment setup + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Cache Conan data + uses: actions/cache@v2 + env: + cache-name: cache-conan-data + with: + path: ~/.conan/data + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/metadata.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + - name: Install Conan + run: | + pip install -U conan + - name: Configure Conan + run: | + conan config init + conan remote add upload ${{ secrets.CONAN_UPLOAD }} + + install: + name: mp-units installation + needs: setup + runs-on: ubuntu-20.04 + steps: + - name: Install Conan dependencies + run: | + mkdir build && cd build + conan install .. -s compiler.cppstd=20 -s compiler.libcxx=libstdc++11 -s build_type=Release -b outdated -u + conan install .. -s compiler.cppstd=20 -s compiler.libcxx=libstdc++11 -s build_type=Debug -b outdated -u + - name: Configure CMake + run: | + cd build + cmake ../src -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=conan_paths.cmake + - name: Install + run: | + cd build + cmake --install . --prefix test_package --config Release + cmake --install . --prefix test_package --config Debug + + test_package: + name: Testing CMake package + needs: install + runs-on: ubuntu-20.04 + steps: + - name: Configure CMake + run: | + mkdir test_package/build && cd test_package/build + cmake .. -G "Ninja Multi-Config" -DCMAKE_INSTALL_PREFIX=../../build/test_package -DCMAKE_TOOLCHAIN_FILE=../../build/conan_paths.cmake + - name: Build and run Release + run: | + cd test_package/build + cmake --build . --config Release + ./Release/test_package + - name: Build and run Debug + run: | + cd test_package/build + cmake --build . --config Debug + ./Debug/test_package diff --git a/CMakeLists.txt b/CMakeLists.txt index a2fb4f47..649a60a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.14) project(mp-units LANGUAGES CXX) diff --git a/cmake/documentation.cmake b/cmake/documentation.cmake index 4b1466da..ee2a6dea 100644 --- a/cmake/documentation.cmake +++ b/cmake/documentation.cmake @@ -20,6 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +cmake_minimum_required(VERSION 3.14) find_package(Doxygen REQUIRED) find_package(Sphinx REQUIRED) diff --git a/cmake/install.cmake b/cmake/install.cmake deleted file mode 100644 index 49f9c7e1..00000000 --- a/cmake/install.cmake +++ /dev/null @@ -1,81 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2017 Mateusz Pusz -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - - -# A path to scripts directory -set(CMAKE_SCRIPTS_ROOT ${CMAKE_CURRENT_LIST_DIR}) - -# Install provided targets -function(install_targets) - if(NOT CMAKE_INSTALL_BINDIR) - set(CMAKE_INSTALL_BINDIR "bin") - endif() - if(NOT CMAKE_INSTALL_LIBDIR) - set(CMAKE_INSTALL_LIBDIR "lib") - endif() - if(NOT CMAKE_INSTALL_INCLUDEDIR) - set(CMAKE_INSTALL_INCLUDEDIR "include") - endif() - install(TARGETS ${ARGN} - EXPORT ${PROJECT_NAME}Targets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} # TODO Remove when CMAKE 3.14 - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # TODO Remove when CMAKE 3.14 - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} # TODO Remove when CMAKE 3.14 - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - ) -endfunction() - -# Generate configuration files and install the package -function(configure_and_install configure_in_file_path namespace version_compare_rules) - if(NOT APPLE) - set(CMAKE_INSTALL_RPATH ${ORIGIN}) - endif() - - # prepare installation files - include(CMakePackageConfigHelpers) - set(ConfigPackageSource ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}) - set(ConfigPackageDestination lib/cmake/${PROJECT_NAME}) - write_basic_package_version_file( - ${ConfigPackageSource}/${PROJECT_NAME}-config-version.cmake - COMPATIBILITY ${version_compare_rules}) - configure_package_config_file(${configure_in_file_path} - ${ConfigPackageSource}/${PROJECT_NAME}-config.cmake - INSTALL_DESTINATION ${ConfigPackageDestination}) - - # install library - install(EXPORT ${PROJECT_NAME}Targets - DESTINATION ${ConfigPackageDestination} - FILE ${PROJECT_NAME}-targets.cmake - NAMESPACE ${namespace}:: - COMPONENT Devel) - install(FILES - "${ConfigPackageSource}/${PROJECT_NAME}-config.cmake" - "${ConfigPackageSource}/${PROJECT_NAME}-config-version.cmake" - DESTINATION ${ConfigPackageDestination} - COMPONENT Devel) - - # local package - export(EXPORT ${PROJECT_NAME}Targets - NAMESPACE ${namespace}:: - FILE ${ConfigPackageSource}/${PROJECT_NAME}-targets.cmake) -endfunction() diff --git a/cmake/static_analysis.cmake b/cmake/static_analysis.cmake index 99c2c9f2..6d97e78a 100644 --- a/cmake/static_analysis.cmake +++ b/cmake/static_analysis.cmake @@ -20,6 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +cmake_minimum_required(VERSION 3.14) macro(enable_clang_tidy) find_program(clang_tidy_cmd NAMES "clang-tidy") diff --git a/cmake/warnings.cmake b/cmake/warnings.cmake index c60a5c8c..e023836d 100644 --- a/cmake/warnings.cmake +++ b/cmake/warnings.cmake @@ -22,6 +22,8 @@ # Based on https://github.com/lefticus/cpp_starter_project/blob/master/cmake/CompilerWarnings.cmake +cmake_minimum_required(VERSION 3.14) + # Configure compiler warning level function(set_warnings target) option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors" TRUE) diff --git a/conanfile.py b/conanfile.py index 76a2a084..99c2111d 100644 --- a/conanfile.py +++ b/conanfile.py @@ -129,13 +129,20 @@ class UnitsConan(ConanFile): self.info.header_only() def package_info(self): + self.cpp_info.filenames["cmake_find_package"] = "mp-units" + self.cpp_info.filenames["cmake_find_package_multi"] = "mp-units" + self.cpp_info.names["cmake_find_package"] = "mp" + self.cpp_info.names["cmake_find_package_multi"] = "mp" + self.cpp_info.components["units"].name = "units" + self.cpp_info.components["units"].requires = ["fmt::fmt", "ms-gsl::ms-gsl"] + compiler = self.settings.compiler version = Version(self.settings.compiler.version) if compiler == "gcc": - self.cpp_info.cxxflags = [ + self.cpp_info.components["units"].cxxflags = [ "-Wno-non-template-friend" ] elif compiler == "Visual Studio": - self.cpp_info.cxxflags = [ + self.cpp_info.components["units"].cxxflags = [ "/utf-8" ] diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index f10f6cdc..eb5d999c 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -20,7 +20,12 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.14) + +option(BUILD_DOCS "Generate project documentation" ON) +if(NOT BUILD_DOCS) + return() +endif() # Find all the public headers file(GLOB_RECURSE unitsPublicHeaders "${PROJECT_SOURCE_DIR}/src/*.h") @@ -221,9 +226,10 @@ set(unitsSphinxDocs include(documentation) include(GNUInstallDirs) -add_documentation(documentation +add_documentation(documentation ALL BREATHE_PROJECT mp-units CODE_SOURCE_DIR "${PROJECT_SOURCE_DIR}/src" + INSTALL_DIR ${CMAKE_INSTALL_DOCDIR} CODE_DEPENDS ${unitsPublicHeaders} DOCS_DEPENDS ${unitsSphinxDocs} ) diff --git a/docs/usage.rst b/docs/usage.rst index c03aaefc..eacc61ff 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -183,7 +183,7 @@ defined by the library. To do so you should use *CMakeLists.txt* file from the * add_subdirectory(/src) # ... - target_link_libraries( PUBLIC|PRIVATE|INTERFACE mp-units::mp-units) + target_link_libraries( PUBLIC|PRIVATE|INTERFACE mp::units) .. important:: @@ -228,7 +228,7 @@ library release the following steps may be performed: .. code-block:: cmake - target_link_libraries( PUBLIC|PRIVATE|INTERFACE mp-units::mp-units) + target_link_libraries( PUBLIC|PRIVATE|INTERFACE mp::units) target_compile_features( PUBLIC|PRIVATE|INTERFACE cxx_std_20) .. important:: diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 44333130..1d5fc778 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -20,11 +20,11 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.14) function(add_example target) add_executable(${target} ${target}.cpp) - target_link_libraries(${target} PRIVATE mp-units::mp-units) + target_link_libraries(${target} PRIVATE mp::units) endfunction() add_example(box_example) diff --git a/example/alternative_namespaces/CMakeLists.txt b/example/alternative_namespaces/CMakeLists.txt index 6341730c..0b9c1d3a 100644 --- a/example/alternative_namespaces/CMakeLists.txt +++ b/example/alternative_namespaces/CMakeLists.txt @@ -20,11 +20,11 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.14) function(add_example target) add_executable(${target}_alt ${target}.cpp) - target_link_libraries(${target}_alt PRIVATE mp-units::mp-units) + target_link_libraries(${target}_alt PRIVATE mp::units) endfunction() add_example(box_example) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4df6fa9b..19e67710 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.14) project(mp-units VERSION 0.7.0 @@ -78,16 +78,22 @@ else() target_compile_definitions(mp-units INTERFACE UNITS_DOWNCAST_MODE=0) endif() -add_library(mp-units::mp-units ALIAS mp-units) - -include(install) +add_library(mp::units ALIAS mp-units) +set_target_properties(mp-units PROPERTIES EXPORT_NAME units) # installation info -install_targets(mp-units) -install(DIRECTORY include/units - DESTINATION include - COMPONENT Devel -) +include(CMakePackageConfigHelpers) +write_basic_package_version_file(mp-unitsConfigVersion.cmake COMPATIBILITY SameMajorVersion) -# generate configuration files and install the package -configure_and_install(../cmake/mp-units-config.cmake.in mp-units SameMajorVersion) +include(GNUInstallDirs) +install(TARGETS mp-units EXPORT mp-unitsTargets) +install(EXPORT mp-unitsTargets + NAMESPACE mp:: + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/mp-units +) +install(FILES mp-unitsConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/mp-unitsConfigVersion.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/mp-units +) +install(DIRECTORY include/units + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) diff --git a/cmake/mp-units-config.cmake.in b/src/mp-unitsConfig.cmake similarity index 94% rename from cmake/mp-units-config.cmake.in rename to src/mp-unitsConfig.cmake index e7af50c3..e9ad2a72 100644 --- a/cmake/mp-units-config.cmake.in +++ b/src/mp-unitsConfig.cmake @@ -23,4 +23,5 @@ include(CMakeFindDependencyMacro) find_dependency(fmt) find_dependency(Microsoft.GSL) -include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake") + +include("${CMAKE_CURRENT_LIST_DIR}/mp-unitsTargets.cmake") diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 32c5ea73..96db7774 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.14) add_subdirectory(unit_test/runtime) add_subdirectory(unit_test/static) diff --git a/test/metabench/CMakeLists.txt b/test/metabench/CMakeLists.txt index b5206de1..c7d08a69 100644 --- a/test/metabench/CMakeLists.txt +++ b/test/metabench/CMakeLists.txt @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.14) function(add_metabench_test target name erb_path range) metabench_add_dataset(${target} "${erb_path}" "${range}" NAME "${name}") diff --git a/test/metabench/list/CMakeLists.txt b/test/metabench/list/CMakeLists.txt index c8776f04..1ba4985a 100644 --- a/test/metabench/list/CMakeLists.txt +++ b/test/metabench/list/CMakeLists.txt @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.14) add_metabench_test(metabench.data.list.type_list.concepts_all "all concepts" type_list_concepts_all.cpp.erb "[3, 6, 9, 12, 15]") add_metabench_test(metabench.data.list.type_list.concepts_iface "concepts in interface" type_list_concepts_iface.cpp.erb "[3, 6, 9, 12, 15]") diff --git a/test/metabench/make_dimension/CMakeLists.txt b/test/metabench/make_dimension/CMakeLists.txt index c3d7c39b..3b76881f 100644 --- a/test/metabench/make_dimension/CMakeLists.txt +++ b/test/metabench/make_dimension/CMakeLists.txt @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.14) add_metabench_test(metabench.data.make_dimension.no_concepts "no concepts" no_concepts.cpp.erb "[1, 2, 3, 4, 6, 8, 10]") add_metabench_test(metabench.data.make_dimension.concepts_iface "concepts iface" concepts_iface.cpp.erb "[1, 2, 3, 4, 6, 8, 10]") diff --git a/test/metabench/ratio/CMakeLists.txt b/test/metabench/ratio/CMakeLists.txt index a3cc5fea..afa1d03f 100644 --- a/test/metabench/ratio/CMakeLists.txt +++ b/test/metabench/ratio/CMakeLists.txt @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.14) add_metabench_test(metabench.data.ratio.create.std_ratio "std::ratio" create_std_ratio.cpp.erb "[1000, 2500, 5000, 7500, 10000]") add_metabench_test(metabench.data.ratio.create.ratio_type_constexpr "ratio with constexpr" create_ratio_type_constexpr.cpp.erb "[1000, 2500, 5000, 7500, 10000]") diff --git a/test/unit_test/runtime/CMakeLists.txt b/test/unit_test/runtime/CMakeLists.txt index 2556b1aa..099c1004 100644 --- a/test/unit_test/runtime/CMakeLists.txt +++ b/test/unit_test/runtime/CMakeLists.txt @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.14) find_package(Catch2 CONFIG REQUIRED) @@ -34,7 +34,7 @@ add_executable(unit_tests_runtime ) target_link_libraries(unit_tests_runtime PRIVATE - mp-units::mp-units + mp::units Catch2::Catch2 ) diff --git a/test/unit_test/static/CMakeLists.txt b/test/unit_test/static/CMakeLists.txt index dfc5aaef..13a7e267 100644 --- a/test/unit_test/static/CMakeLists.txt +++ b/test/unit_test/static/CMakeLists.txt @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.14) add_library(unit_tests_static cgs_test.cpp @@ -48,5 +48,5 @@ add_library(unit_tests_static ) target_link_libraries(unit_tests_static PRIVATE - mp-units::mp-units + mp::units ) diff --git a/test_package/CMakeLists.txt b/test_package/CMakeLists.txt index 538680b9..369868f7 100644 --- a/test_package/CMakeLists.txt +++ b/test_package/CMakeLists.txt @@ -26,8 +26,8 @@ project(test_package) # enable package discovery based on the local configuration files list(PREPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR}) -# test cmake-generated target find_package(mp-units CONFIG REQUIRED) + add_executable(test_package test_package.cpp) -target_link_libraries(test_package PRIVATE mp-units::mp-units) +target_link_libraries(test_package PRIVATE mp::units) target_compile_features(test_package PRIVATE cxx_std_20)