Installing

The library can be installed using CMake (any version over 3.21).

Dependencies

Custom search paths to dependent packages can be provided with the following CMake options (or environment variable):

Option / Environment Variable

Description

Doxygen_ROOT

Add search path to doxygen program.

Sphinx_ROOT

Add search path to sphinx-build program.

Note

These feature is provided by CMake under the CMP0074 policy

Building library

Obtain a copy of the source by either downloading the zipball or cloning the public repository:

git clone git@github.com:untwine/pxr-arch.git

Then you can build and install the library as follows:

cd arch
cmake -DCMAKE_INSTALL_PREFIX=/path/to/destination -S . -B ./build ..
cmake --build ./build --target install

Here are a few CMake options that can be used to influence the building process:

Option

Description

BUILD_TESTS

Indicate whether tests should be built. Default is true.

BUILD_DOCS

Indicate whether documentation should be built. Default is true.

BUILD_SHARED_LIBS

Indicate whether library should be built shared. Default is true.

CMAKE_CXX_STANDARD

Indicate the C++ standard requested. Default is C++ 17.

ENABLE_PRECOMPILED_HEADERS

Support pre-compiled headers. Default is false.

The build type can be influenced by the CMAKE_BUILD_TYPE option or environment variable. By default, the “Release” build type will be used.

The library can then be used by other programs or libraries via the following Cmake target:

  • pxr::arch

Building documentation

Ensure that Doxygen is installed. The required Python dependencies must also be installed as follows:

pip install -r doc/requirements.txt

Then build the documentation as follows:

cmake --build ./build --target documentation

Note

The documentation built by default, unless you set the BUILD_DOCS CMake option to false.

Running tests

Ensure that GTest is installed.

Once the library and all tests are built, you can run the tests using Ctest within the build folder as follows:

ctest

You can increase the verbosity and filter in one or several tests as follows:

ctest -VV
ctest -R DemangleTest.Bool -VV
ctest -R DemangleTest.* -VV

Note

The tests are built by default, unless you set the BUILD_TESTS CMake option to false.