Skip to content

Commit 31d1944

Browse files
committed
More adjustments to INSTALL test. Sean mentioned we should phase out aliases for options - not doing that for this release, but when we do it'll be a good opportunity to clean up this file's discussion of options as well.
1 parent 98ce3c3 commit 31d1944

File tree

1 file changed

+49
-96
lines changed

1 file changed

+49
-96
lines changed

INSTALL

+49-96
Original file line numberDiff line numberDiff line change
@@ -134,72 +134,58 @@ you need/want will determine which configuration options you should
134134
use. See the CONFIGURATION OPTIONS section below for details on how
135135
to go about selecting which options are appropriate for you.
136136

137-
BRL-CAD's dependencies are managed in a third party repository, located at
137+
BRL-CAD's dependencies are managed in a separate repository, located at
138138
https://github.com/BRL-CAD/bext By default BRL-CAD's configure process will
139-
download and manage the necessary dependencies, but there are a number of
140-
scenarios and options defined that will allow developers to control how this
141-
process works. The full dependency stack of BRL-CAD, with all optional and
142-
experimental features enabled, is a VERY large and a long compile. Therefore,
143-
the bext build outputs can be built as their own separate, external project to
144-
allow for reuse of the compiled outputs. In this mode, the main BRL-CAD build
145-
simply copies and tweaks the specified bext outputs for its own immediate uses,
146-
avoiding the need for a full rebuild every time the BRL-CAD build directory is
147-
cleared. The downside of this approach is that ALL compiled output libraries
148-
of bext will always be included, regardless of whether changes in build
149-
configuration would have otherwise disabled them. For example, if building
150-
BRL-CAD with Tcl/Tk support disabled, using a pre-existing bext with Tcl/Tk
151-
compiled into it will still result in the Tcl/Tk files getting bundled with
152-
BRL-CAD, even though it does not use them. The advantage of letting BRL-CAD
153-
handle building bext is it can be more nuanced about what it compiles based
154-
on BRL-CAD feature settings, but that in turn means the BRL-CAD configure
155-
process will have to complete the bext build and install stages before it
156-
can finalized the main BRL-CAD build files.
157-
158-
If no pre-supplied bext build outputs are supplied, BRL-CAD's configure
159-
process needs to create them - but if an existing bext clone is available,
160-
it can be pointed to with the BRLCAD_EXT_SOURCE_DIR variable rather than
161-
requiring another clone operation. This is one mode that can be used for
162-
compilation when the internet isn't available.
163-
164-
The simplest way to ensure everything is available for building is to do
165-
a recursive git clone on the main BRL-CAD repository, which will pull all
166-
sources that might be needed into src/bext within the BRL-CAD source tree.
167-
Note that this will be a full clone, so it will require a fair bit of disk
168-
space. The configure-managed bext build process will populate only the
169-
modules needed based on the build settings, so it has the potential to be
170-
much lighter weight.
171-
172-
Various useful configurations:
173-
174-
* Get a git clone that has everything which might be needed
139+
download and manage the necessary dependencies, avoiding the need for user
140+
awareness of the bext repository, but there are a number of scenarios where it
141+
is advantageous for developers to adjust how this process works.
142+
143+
The full dependency stack of BRL-CAD, with all optional and experimental
144+
features enabled, is a VERY large and long compile. Therefore, the bext build
145+
outputs can be built as their own separate, external project to allow for reuse
146+
of the compiled outputs. Building bext separately means BRL-CAD won't get a
147+
chance to customize what is and is not built, but the trade-off is that outputs
148+
can be built once and reused over and over. Doing so can significantly shorten
149+
time spent configuring BRL-CAD builds - reusing bext compiled outputs is
150+
recommended for serious developers.
151+
152+
Various useful configurations for working with bext:
153+
154+
* Get a git clone that has everything which might be needed (large,
155+
but useful for offline building)
156+
175157
git clone --recurse-submodules https://github.com/BRL-CAD/brlcad
176158

177-
* Have prebuilt bext outputs - just copy and prepare
159+
* Have prebuilt bext outputs to reuse - BRL-CAD will simply copy and prepare
160+
the pre-existing files
161+
178162
cmake .. -DBRLCAD_EXT_DIR=/home/user/bext_output
179163

180-
* Have bext clone but want BRL-CAD to build
164+
* Already have an existing bext clone but want BRL-CAD to build bext outputs
165+
181166
cmake .. -DBRLCAD_EXT_SOURCE_DIR=/home/user/bext
182167

183-
* Download and build only what is needed for librt
168+
* Download, build and bundle only what is needed for librt
169+
184170
cmake .. -DBRLCAD_COMPONENTS=librt
185171

186172
* Build and bundle only what is needed, but don't require internet for bext clone
187173
cmake .. -DBRLCAD_EXT_SOURCE_DIR=/home/user/bext -DBRLCAD_COMPONENTS=librt
188174

189175

190-
By default, the default configuration will prepare the build system to perform
191-
a Debug build and install into the /usr/brlcad/dev-X.Y.Z directory. The
192-
CMAKE_INSTALL_PREFIX option may be used to change that directory, or a Release
193-
build type may be specified to install to /usr/brlcad/rel-X.Y.Z - more on this
194-
below. The tradition of non-system installation paths goes back a couple of
195-
decades and is a convenient means to isolate the BRL-CAD solid modeling system
196-
from your system, resolves conflicts, facilitates uninstalls, and simplifies
197-
upgrades. The default configuration is performed by running `cmake'. It is
198-
not required to do the build in a directory different from your source
199-
directory, but it is much cleaner and *highly* recommended - this guide will
200-
illustrate the build process with the assumption that the BRL-CAD source code
201-
is in the directory brlcad-X.Y.Z and the directory intended to hold the build
202-
output is brlcad-build, located in the same parent directory as brlcad-X.Y.Z:
176+
By default, the build system will prepare a Debug build and install into the
177+
/usr/brlcad/dev-X.Y.Z directory. The CMAKE_INSTALL_PREFIX option may be used
178+
to change that directory, or a Release build type may be specified to install
179+
to /usr/brlcad/rel-X.Y.Z - more on this below. The tradition of non-system
180+
installation paths goes back a couple of decades and is a convenient means to
181+
isolate the BRL-CAD solid modeling system from your system, resolves conflicts,
182+
facilitates uninstalls, and simplifies upgrades. The default configuration is
183+
performed by running `cmake'. It is not required to do the build in a
184+
directory different from your source directory, but it is much cleaner and
185+
*highly* recommended - this guide will illustrate the build process with the
186+
assumption that the BRL-CAD source code is in the directory brlcad-X.Y.Z and
187+
the directory intended to hold the build output is brlcad-build, located in the
188+
same parent directory as brlcad-X.Y.Z:
203189

204190
.
205191
./brlcad-X.Y.Z
@@ -234,30 +220,14 @@ override the ../brlcad-install default. Build types are a convenient way
234220
to bundle sets of settings, but they do not prevent overrides if a more
235221
custom setup is needed.
236222

237-
By default, all components and functionality will be built.
238-
Note that BRL-CAD does require and include several 3rd party
239-
components. If your system does not include a sufficient version of
240-
those required 3rd party components, they will be automatically
241-
configured for compilation.
242-
243223
If the autodetection mechanisms fail to produce a working configuration,
244224
the next simplest approach is typically to enable ALL the third party
245225
components - this is typically a well tested configuration, but will
246226
increase both the build time and final install size of BRL-CAD on
247227
the system. To set this variable on the command line, use -D to
248-
define BRLCAD_BUNDLED_LIBS for CMake:
249-
250-
-DBRLCAD_BUNDLED_LIBS=Bundled
228+
define ENABLE_ALL for CMake:
251229

252-
If the graphical interface (cmake-gui) is in use, it will list this
253-
and other common options by default, allowing the user change them
254-
graphically. This is often quicker and more convenient than
255-
defining options on the command line, but both will work.
256-
257-
You can also force on or off any individual 3rd party library by
258-
setting the BRL-CAD variable for that feature to either on or off:
259-
260-
-DBRLCAD_<LIBRARY>=ON
230+
-DENABLE_ALL=ON
261231

262232
To obtain an optimized build (for example, for BRL-CAD Benchmark
263233
performance evaluation), enable BRLCAD_FLAGS_OPTIMIZATION:
@@ -267,23 +237,6 @@ performance evaluation), enable BRLCAD_FLAGS_OPTIMIZATION:
267237
See the CONFIGURATION OPTIONS below for more details on all of the
268238
possible settings.
269239

270-
You can specify options or preferences you want to always use by
271-
default. For example, to always enable all local libs the following
272-
line can be added to your own configuration file:
273-
274-
set(BRLCAD_BUNDLED_LIBS "Bundled" CACHE STRING "Enable all local libs")
275-
276-
You can define your own configuration file in one of three ways. The
277-
build system will search for the file in this order:
278-
279-
${BRLCAD_SOURCE_DIR}/../BRL-CAD_CONFIG.GLOBAL
280-
281-
${BRLCAD_SOURCE_DIR}/BRL-CAD_CONFIG.GLOBAL
282-
283-
the file defined in the environment variable "BRLCAD_USER_GLOBAL_CONFIG_FILE"
284-
285-
The build system will use the first file defined that exists.
286-
287240
Once configured, you should be able to successfully build BRL-CAD via
288241
make:
289242

@@ -422,6 +375,14 @@ If specified, BRL-CAD will look in this directory for bext compiled outputs to
422375
bundle and use during the build.
423376

424377

378+
--- BRLCAD_EXT_SOURCE_DIR ---
379+
380+
If specified, BRL-CAD will look in this directory for bext source files. Use
381+
this when you have a pre-existing bext clone and don't want BRL-CAD's configure
382+
process to pull down another copy, but are still looking to have the BRL-CAD
383+
configure process manage producing bext build outputs.
384+
385+
425386
--- BRLCAD_DEBUGGING ---
426387

427388
Add compiler flags to aid in program debugging. Defaults to ON.
@@ -441,14 +402,6 @@ compilers will utilize data from the first pass to guide optimization,
441402
typically resulting in a significant performance increase:
442403

443404

444-
--- BRLCAD_EXT_SOURCE_DIR ---
445-
446-
If specified, BRL-CAD will look in this directory for bext source files. Use
447-
this when you have a pre-existing bext clone and don't want BRL-CAD's configure
448-
process to pull down another copy, but are still looking to have the BRL-CAD
449-
configure process manage producing bext build outputs.
450-
451-
452405
--- BRLCAD_WARNINGS ---
453406

454407
Use extra warning flags when compiling C/C++ code. Defaults to ON.

0 commit comments

Comments
 (0)