building cmake without the bootstrap step

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

building cmake without the bootstrap step

René J. V.  Bertin
Hi,

If I understand correctly, configuring CMake for building means bootstrapping a basic version of itself which is then run on the included CMakeLists.txt file. That takes a lot of time (comparatively) which begs the question if there's a more-of-less official way to skip the bootstrap and just use the installed cmake binary?

Thanks,
René
--

Powered by kitware.com/cmake

Kitware offers various services to support the CMake community. For more information on each offering, please visit https://cmake.org/services

Visit other Kitware open-source projects at https://www.kitware.com/platforms

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

This mailing list is deprecated in favor of https://discourse.cmake.org
Reply | Threaded
Open this post in threaded view
|

Re: building cmake without the bootstrap step

CMake mailing list
On Thu, 2019-12-12 at 15:15 +0100, René J.V. Bertin wrote:
> Hi,
>
> If I understand correctly, configuring CMake for building means
> bootstrapping a basic version of itself which is then run on the
> included CMakeLists.txt file. That takes a lot of time
> (comparatively) which begs the question if there's a more-of-less
> official way to skip the bootstrap and just use the installed cmake
> binary?

The bootstrap CMake does not have all of the capabilities of the real
CMake - just enough to build CMake itself. It is intended to be used
once to build the real CMake and then immediately discarded.

If you want to skip bootstrapping, you can use a pre-existing CMake
binary for your system to build the new CMake.

This mailing list is deprecated. Please head over to Discourse for
further discussion:

https://discourse.cmake.org/c/usage

Kyle
--

Powered by kitware.com/cmake

Kitware offers various services to support the CMake community. For more information on each offering, please visit https://cmake.org/services

Visit other Kitware open-source projects at https://www.kitware.com/platforms

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

This mailing list is deprecated in favor of https://discourse.cmake.org
Reply | Threaded
Open this post in threaded view
|

Re: building cmake without the bootstrap step

René J. V.  Bertin
On Thursday December 12 2019 09:36:03 Kyle Edwards wrote:

>If you want to skip bootstrapping, you can use a pre-existing CMake
>binary for your system to build the new CMake.
>
>This mailing list is deprecated. Please head over to Discourse for
>further discussion:

OK, thanks. To finish things up here, there is thus nothing in the arguments to the bootstrap script that is crucial and cannot be set via a preexisting cmake command?

R.
--

Powered by kitware.com/cmake

Kitware offers various services to support the CMake community. For more information on each offering, please visit https://cmake.org/services

Visit other Kitware open-source projects at https://www.kitware.com/platforms

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

This mailing list is deprecated in favor of https://discourse.cmake.org
Reply | Threaded
Open this post in threaded view
|

Re: building cmake without the bootstrap step

René J. V.  Bertin
Never mind, this tweak to the bootstrap script should take care of anything not directly obvious. Could do with an automated test of the installed version but the accepted version range is so large that doesn't seem to be the trouble.

```
if [ -x ${cmake_prefix_dir}/bin/cmake ] ;then
  # use the existing cmake that we'll be replacing.
  ln -s ${cmake_prefix_dir}/bin/cmake ${cmake_bootstrap_dir}/cmake
else
  # Run make to build bootstrap cmake
  if [ "x${cmake_parallel_make}" != "x" ]; then
    ${cmake_make_processor} ${cmake_make_flags}
  else
    ${cmake_make_processor}
  fi
  RES=$?
  if [ "${RES}" -ne "0" ]; then
    cmake_error 9 "Problem while running ${cmake_make_processor}"
  fi
fi
cd "${cmake_binary_dir}"
```

R
--

Powered by kitware.com/cmake

Kitware offers various services to support the CMake community. For more information on each offering, please visit https://cmake.org/services

Visit other Kitware open-source projects at https://www.kitware.com/platforms

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

This mailing list is deprecated in favor of https://discourse.cmake.org