Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align/improve CMake/Conan packaging #32

Closed
48 tasks done
martinmoene opened this issue Mar 19, 2019 · 0 comments
Closed
48 tasks done

Align/improve CMake/Conan packaging #32

martinmoene opened this issue Mar 19, 2019 · 0 comments

Comments

@martinmoene
Copy link
Owner

martinmoene commented Mar 19, 2019

See span-lite PR 37.

  1. Install config where CMake find_package() can find it.
  2. Make CMake install architecture-independent.
  3. Improve conan/cmake interoperation.

Plan 1. Install config where CMake find_package() can find it.
In ./CMakeLists.txt, replace
set( package_folder "${package_nspace}" ) with
set( package_folder "${package_name}" ).

Progress 1:

  • X - lest
  • gsl-lite
  • any-lite
  • byte-lite
  • expected-lite
  • X - invoke-lite
  • observer-ptr-lite
  • X - optional-fun-lite
  • optional-lite
  • ring-span-lite
  • X - scope-guard-lite (no code yet)
  • span-lite (inspired this issue)
  • status-value-lite
  • string-view-lite
  • value-ptr-lite
  • variant-lite

Plan 2. Make CMake install arch independent:

  • Add ./cmake/{project}-config-version.cmake.in (see span-lite's file)
  • Change CMakeLists.txt: replace write_basic_package_version_file() with:
configure_file(
   "${CMAKE_CURRENT_SOURCE_DIR}/cmake/${package_name}-config-version.cmake.in"
   "${CMAKE_CURRENT_BINARY_DIR}/${package_config_version}" @ONLY
)

Progress 2:

  • X - lest
  • gsl-lite
  • any-lite
  • byte-lite
  • expected-lite
  • X - invoke-lite
  • observer-ptr-lite
  • X - optional-fun-lite
  • optional-lite
  • ring-span-lite
  • X - scope-guard-lite (no code yet)
  • span-lite (inspired this issue)
  • status-value-lite
  • string-view-lite
  • value-ptr-lite
  • variant-lite

Plan 3. Improve conan/cmake interoperation.
Change conanfile.py:

  • Add "CMakeLists.txt", "cmake/*",
    exports_sources = "include/nonstd/*", "CMakeLists.txt", "cmake/*", "LICENSE.txt"

  • Change def package(self) to:

    def package(self):
        """Run CMake install"""
        cmake = CMake(self)
        cmake.definitions["{PROJECT}_OPT_BUILD_TESTS"] = "OFF"
        cmake.definitions["{PROJECT}_OPT_BUILD_EXAMPLES"] = "OFF"
        cmake.configure()
        cmake.install()

Progress 3:

  • X - lest
  • gsl-lite
  • any-lite
  • byte-lite
  • expected-lite
  • X - invoke-lite
  • observer-ptr-lite
  • X - optional-fun-lite
  • optional-lite
  • ring-span-lite
  • X - scope-guard-lite (no code yet)
  • span-lite (inspired this issue)
  • status-value-lite
  • string-view-lite
  • value-ptr-lite
  • variant-lite
@martinmoene martinmoene changed the title Align/improve Cmake/Conan packaging Align/improve CMake/Conan packaging Mar 19, 2019
@martinmoene martinmoene added this to To do in Improve coherence between lite projects via automation Mar 19, 2019
@martinmoene martinmoene moved this from To do to In progress in Improve coherence between lite projects Mar 24, 2019
martinmoene added a commit to martinmoene/observer-ptr-lite that referenced this issue Mar 27, 2019
martinmoene added a commit to martinmoene/observer-ptr-lite that referenced this issue Mar 27, 2019
martinmoene added a commit to martinmoene/observer-ptr-lite that referenced this issue Mar 27, 2019
martinmoene added a commit to martinmoene/optional-fun-lite that referenced this issue Apr 8, 2019
martinmoene added a commit to martinmoene/optional-fun-lite that referenced this issue Apr 8, 2019
martinmoene added a commit to martinmoene/ring-span-lite that referenced this issue Apr 8, 2019
martinmoene added a commit to martinmoene/status-value-lite that referenced this issue Apr 8, 2019
martinmoene added a commit to martinmoene/status-value-lite that referenced this issue Apr 8, 2019
martinmoene added a commit to martinmoene/string-view-lite that referenced this issue Apr 8, 2019
martinmoene added a commit to martinmoene/string-view-lite that referenced this issue Apr 8, 2019
martinmoene added a commit to martinmoene/value-ptr-lite that referenced this issue Apr 8, 2019
martinmoene added a commit to martinmoene/status-value-lite that referenced this issue Apr 18, 2019
martinmoene added a commit to martinmoene/string-view-lite that referenced this issue Apr 18, 2019
martinmoene added a commit to martinmoene/observer-ptr-lite that referenced this issue Apr 18, 2019
martinmoene added a commit to martinmoene/status-value-lite that referenced this issue Apr 18, 2019
martinmoene added a commit to martinmoene/string-view-lite that referenced this issue Apr 18, 2019
@martinmoene martinmoene moved this from In progress to Done in Improve coherence between lite projects Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant