mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-30 18:37:15 +02:00
build: cmake_paths is now supported by Conan recipe
This commit is contained in:
2
.github/workflows/documentation.yml
vendored
2
.github/workflows/documentation.yml
vendored
@ -79,7 +79,7 @@ jobs:
|
|||||||
- name: Install Conan dependencies
|
- name: Install Conan dependencies
|
||||||
run: |
|
run: |
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
conan install .. -g cmake_paths -s compiler.cppstd=20 -s compiler.libcxx=libstdc++11 -e mp-units:CONAN_RUN_TESTS=True -b outdated -u
|
conan install .. -s compiler.cppstd=20 -s compiler.libcxx=libstdc++11 -e mp-units:CONAN_RUN_TESTS=True -b outdated -u
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
|
@ -26,7 +26,7 @@ from conan.tools.cmake import CMakeToolchain, CMake
|
|||||||
from conans.errors import ConanInvalidConfiguration
|
from conans.errors import ConanInvalidConfiguration
|
||||||
import re
|
import re
|
||||||
|
|
||||||
required_conan_version = ">=1.32.0"
|
required_conan_version = ">=1.33.0"
|
||||||
|
|
||||||
def get_version():
|
def get_version():
|
||||||
try:
|
try:
|
||||||
@ -65,7 +65,7 @@ class UnitsConan(ConanFile):
|
|||||||
# "revision": "auto",
|
# "revision": "auto",
|
||||||
# "submodule": "recursive"
|
# "submodule": "recursive"
|
||||||
# }
|
# }
|
||||||
generators = "cmake_find_package_multi"
|
generators = "cmake_find_package_multi", "cmake_paths"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _run_tests(self):
|
def _run_tests(self):
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
- fix: ambiguous case for empty type list resolved
|
- fix: ambiguous case for empty type list resolved
|
||||||
- (!) build: The library should now be linked as `mp::units` in the CMake's `target_link_libraries()`
|
- (!) build: The library should now be linked as `mp::units` in the CMake's `target_link_libraries()`
|
||||||
- (!) build: `BUILD_DOCS` CMake option renamed to `UNITS_BUILD_DOCS`
|
- (!) build: `BUILD_DOCS` CMake option renamed to `UNITS_BUILD_DOCS`
|
||||||
- (!) build: `-g cmake_paths` has to be manually provided for `conan install` command (workaround for a Conan bug)
|
|
||||||
- build: doxygen updated to 1.8.20
|
- build: doxygen updated to 1.8.20
|
||||||
- build: catch2 updated to 2.13.4
|
- build: catch2 updated to 2.13.4
|
||||||
- build: fmt updated to 7.1.3
|
- build: fmt updated to 7.1.3
|
||||||
|
@ -331,13 +331,12 @@ in **mp-units** repository, you should:
|
|||||||
The above will download and install all of the dependencies needed for the development of the library,
|
The above will download and install all of the dependencies needed for the development of the library,
|
||||||
build all of the source code and documentation, and run unit tests.
|
build all of the source code and documentation, and run unit tests.
|
||||||
|
|
||||||
If you prefer to build the project via CMake rather then Conan, then you should add ``-g cmake_paths`` generator
|
If you prefer to build the project via CMake rather then Conan, then you should replace the last ``conan build ..``
|
||||||
to ``conan install`` and replace the last ``conan build ..`` step with the CMake build:
|
step with the CMake build:
|
||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: shell
|
||||||
|
|
||||||
# ...
|
# ...
|
||||||
conan install .. -g cmake_paths -pr <your_conan_profile> -s compiler.cppstd=20 -e mp-units:CONAN_RUN_TESTS=True -b outdated -u
|
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
|
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
|
||||||
cmake --build . --config Release
|
cmake --build . --config Release
|
||||||
ctest
|
ctest
|
||||||
|
Reference in New Issue
Block a user