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

CMake build is missing key features to be properly usable via FetchContent #550

Closed
globberwops opened this issue Jul 17, 2021 · 0 comments · Fixed by #551
Closed

CMake build is missing key features to be properly usable via FetchContent #550

globberwops opened this issue Jul 17, 2021 · 0 comments · Fixed by #551

Comments

@globberwops
Copy link
Contributor

Describe the bug

The CMake build is missing key features to be properly usable via CMake's FetchContent module.

Describe how to reproduce the bug

Steps to reproduce the behavior:

  1. In a downstream CMake project, do
include(FetchContent)
FetchContent_Declare(
  open-simulation-interface
  GIT_REPOSITORY https://github.com/OpenSimulationInterface/open-simulation-interface.git
  GIT_TAG v3.3.1
)
FetchContent_MakeAvailable(open-simulation-interface)
  1. This will
    a. pollute your upstream project's cache with non-prefixed variables INSTALL_LIB_DIR, INSTALL_INCLUDE_DIR, and INSTALL_CMAKE_DIR
    b. not provide namespaced alias targets e.g. open-simulation-interface::static
    c. not install the export set with a namespace
    d. pollute the downstream project's build with an unnecessary, redundant warning:
    message(WARNING "Doxygen could not be found.")

Describe the expected behavior

  1. prefix cache variables with the project name
  2. provide namespaced alias targets usable from the build tree
  3. provide a namespace for the export set
  4. do not warn unnecessarily
globberwops added a commit to globberwops/open-simulation-interface that referenced this issue Jul 17, 2021
* Prefix cache variables with OSI_ identifier
* Use option() to set cache variables

Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
globberwops added a commit to globberwops/open-simulation-interface that referenced this issue Jul 20, 2021
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
globberwops added a commit to globberwops/open-simulation-interface that referenced this issue Jul 20, 2021
* Fix the cache variables
* Copy the headers to the appropriate location in the PROJECT_BINARY_DIR
* Rewrite the package config file template
* Create proper config, version, and target files
  using CMakePackageConfigHelpers
* Export and install namespaced targets

Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
globberwops added a commit to globberwops/open-simulation-interface that referenced this issue Jul 20, 2021
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
globberwops added a commit to globberwops/open-simulation-interface that referenced this issue Jul 20, 2021
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
globberwops added a commit to globberwops/open-simulation-interface that referenced this issue Jul 20, 2021
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
globberwops added a commit to globberwops/open-simulation-interface that referenced this issue Sep 8, 2021
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
globberwops added a commit to globberwops/open-simulation-interface that referenced this issue Sep 8, 2021
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
globberwops added a commit to globberwops/open-simulation-interface that referenced this issue Sep 8, 2021
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
globberwops added a commit to globberwops/open-simulation-interface that referenced this issue Sep 8, 2021
…evel

Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
pmai pushed a commit to globberwops/open-simulation-interface that referenced this issue May 23, 2022
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
pmai pushed a commit to globberwops/open-simulation-interface that referenced this issue May 23, 2022
* Fix the cache variables
* Copy the headers to the appropriate location in the PROJECT_BINARY_DIR
* Rewrite the package config file template
* Create proper config, version, and target files
  using CMakePackageConfigHelpers
* Export and install namespaced targets

Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
pmai pushed a commit to globberwops/open-simulation-interface that referenced this issue May 23, 2022
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
pmai pushed a commit to globberwops/open-simulation-interface that referenced this issue May 23, 2022
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
pmai pushed a commit to globberwops/open-simulation-interface that referenced this issue May 23, 2022
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
pmai pushed a commit to globberwops/open-simulation-interface that referenced this issue May 23, 2022
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
pmai pushed a commit to globberwops/open-simulation-interface that referenced this issue May 23, 2022
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
pmai pushed a commit to globberwops/open-simulation-interface that referenced this issue May 23, 2022
…evel

Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
@pmai pmai closed this as completed in #551 May 23, 2022
pmai added a commit that referenced this issue May 23, 2022
…ey-features-to-be-properly-usable-via-fetchcontent

#550 cmake build is missing key features to be properly usable via fetchcontent
adrianschultz pushed a commit to adrianschultz/open-simulation-interface that referenced this issue May 25, 2022
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
Signed-off-by: Adrian Vernickel <adrian.vernickel@hexagon.com>
adrianschultz pushed a commit to adrianschultz/open-simulation-interface that referenced this issue May 25, 2022
* Fix the cache variables
* Copy the headers to the appropriate location in the PROJECT_BINARY_DIR
* Rewrite the package config file template
* Create proper config, version, and target files
  using CMakePackageConfigHelpers
* Export and install namespaced targets

Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
Signed-off-by: Adrian Vernickel <adrian.vernickel@hexagon.com>
adrianschultz pushed a commit to adrianschultz/open-simulation-interface that referenced this issue May 25, 2022
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
Signed-off-by: Adrian Vernickel <adrian.vernickel@hexagon.com>
adrianschultz pushed a commit to adrianschultz/open-simulation-interface that referenced this issue May 25, 2022
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
Signed-off-by: Adrian Vernickel <adrian.vernickel@hexagon.com>
adrianschultz pushed a commit to adrianschultz/open-simulation-interface that referenced this issue May 25, 2022
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
Signed-off-by: Adrian Vernickel <adrian.vernickel@hexagon.com>
adrianschultz pushed a commit to adrianschultz/open-simulation-interface that referenced this issue May 25, 2022
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
Signed-off-by: Adrian Vernickel <adrian.vernickel@hexagon.com>
adrianschultz pushed a commit to adrianschultz/open-simulation-interface that referenced this issue May 25, 2022
Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
Signed-off-by: Adrian Vernickel <adrian.vernickel@hexagon.com>
adrianschultz pushed a commit to adrianschultz/open-simulation-interface that referenced this issue May 25, 2022
…evel

Signed-off-by: Martin Stump <11492152+globberwops@users.noreply.github.com>
Signed-off-by: Adrian Vernickel <adrian.vernickel@hexagon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant