https://github.com/jcfr/cmake-externalproject-install-step-regression
Reproduce a regression introduced in CMake v3.25 through kitware/cmake@66b5d51f3
https://github.com/jcfr/cmake-externalproject-install-step-regression
Last synced: 2 months ago
JSON representation
Reproduce a regression introduced in CMake v3.25 through kitware/cmake@66b5d51f3
- Host: GitHub
- URL: https://github.com/jcfr/cmake-externalproject-install-step-regression
- Owner: jcfr
- License: apache-2.0
- Created: 2023-03-02T17:15:12.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-02T17:17:22.000Z (about 2 years ago)
- Last Synced: 2025-01-24T10:24:32.154Z (4 months ago)
- Language: CMake
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ExternalProject Install step regression
This project was created to reproduce a regression introduced in CMake v3.25 through [kitware/cmake@66b5d51f3](https://github.com/Kitware/CMake/commit/66b5d51f3812ecb04d1cc1901016236249e70b49) originally intended to fix issue [#23946](https://gitlab.kitware.com/cmake/cmake/-/issues/23946).
```
ExternalProject: Install CMake projects using 'cmake --install'In some cases, `cmake --install .` implements additional semantics over
just `cmake --build . --target install`. For example, using the Xcode
"new build system" with `IOS_INSTALL_COMBINED` requires special support
from `cmake --install` beyond building the `install` target.Fixes: #23946
```## Reproducing the issue
```
git clone https://github.com/jcfr/cmake-ExternalProject-install-step-regressioncmake -S cmake-ExternalProject-install-step-regression -B cmake-ExternalProject-install-step-regression-build
cmake --build cmake-ExternalProject-install-step-regression-build --config Release
```* Output of `cmake --build cmake-ExternalProject-install-step-regression-build --target install --config Release`
```
[100%] This custom target is always expected to be built
Building project...
[100%] Built target build
Install the project...
-- Install configuration: ""
Installing project...
```* Output of `cmake --install cmake-ExternalProject-install-step-regression-build --config Release`
```
Installing project...
```## Observations
Running the CMake command `--install` does not attempt to re-build the project whereas building the `install` target is.
## Analysis
External projects implemented with the assumption that the build step will implicitly be re-built by simply building the install target may not work as expected.
This understanding seems to be consistent with the description of the install step command:
> If the configure step assumed the external project uses CMake as its build system, the install step will also. Otherwise, the install step will assume a Makefile-based build and simply run make install as the default build step.
>
> Source: https://cmake.org/cmake/help/v3.25/module/ExternalProject.html