Commit 943a50da authored by Brad King's avatar Brad King 💬
Browse files

README: Suggest bootstrapping out-of-source for development

Building in-source and running the test suite in-source both leave
many artifacts that we (purposely) do not cover via `.gitignore`.
For developing CMake we typically use out-of-source builds, so
suggest this in the README.
parent 18ff514b
...@@ -57,12 +57,19 @@ You need to have a C++ compiler (supporting C++11) and a ``make`` installed. ...@@ -57,12 +57,19 @@ You need to have a C++ compiler (supporting C++11) and a ``make`` installed.
Run the ``bootstrap`` script you find in the source directory of CMake. Run the ``bootstrap`` script you find in the source directory of CMake.
You can use the ``--help`` option to see the supported options. You can use the ``--help`` option to see the supported options.
You may use the ``--prefix=<install_prefix>`` option to specify a custom You may use the ``--prefix=<install_prefix>`` option to specify a custom
installation directory for CMake. You can run the ``bootstrap`` script from installation directory for CMake. Once this has finished successfully,
within the CMake source directory or any other build directory of your run ``make`` and ``make install``.
choice. Once this has finished successfully, run ``make`` and
``make install``. In summary::
$ ./bootstrap && make && sudo make install For example, if you simply want to build and install CMake from source,
you can build directly in the source tree::
$ ./bootstrap && make && sudo make install
Or, if you plan to develop CMake or otherwise run the test suite, create
a separate build tree::
$ mkdir cmake-build && cd cmake-build
$ ../cmake-source/bootstrap && make
Windows Windows
^^^^^^^ ^^^^^^^
...@@ -79,9 +86,7 @@ There are two ways for building CMake under Windows: ...@@ -79,9 +86,7 @@ There are two ways for building CMake under Windows:
$ pacman -S --needed git base-devel mingw-w64-x86_64-gcc $ pacman -S --needed git base-devel mingw-w64-x86_64-gcc
and bootstrap as above:: and bootstrap as above.
$ ./bootstrap && make
.. _`CMake Download Page`: https://cmake.org/cmake/resources/software.html .. _`CMake Download Page`: https://cmake.org/cmake/resources/software.html
.. _`MSYS2`: https://www.msys2.org/ .. _`MSYS2`: https://www.msys2.org/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment