CMake reference
CMake options
Here is an exhaustive list of all CMake options available for customization.
Descriptions
Option name |
Description |
|
Build shared libs |
|
Enable building the test suite |
|
Clean third-party installation directory |
|
Allow the use of an unsupported comipler version for CUDA |
|
Use static versions of the Nvidia CUDA libraries |
|
Forcefully disable the Fortran compiler for some 3rd party libraries |
|
Enable verbose output to debug CMake issues |
|
Enable the use of CUDA code |
|
Enable the building of the (new) experimental C++ backend |
|
Use Gitee instead of GitHub for (some) third-party dependencies |
|
Use /MD, /MDd flags when compiling (MSVC only) |
|
Use /MT, /MTd flags when compiling (MSVC only) |
|
Enable compilation with profiling flags |
|
Enable ProjectQ support |
|
Prefer RUNPATH over RPATH when linking |
|
Enable stack protection during compilation |
|
Build the C++ MindQuantum libraries in-place |
|
Whether CMake is called from setup.py |
|
Enable –enable-new-dtags (else use –disable-new-dtags) |
|
Use -z,noexecstack during linking (if supported) |
|
Use -z,relro during linking (if supported) |
|
Use RUNPATH/RPATH related flags when compiling |
|
Use –strip-all during linking (if supported) |
|
Use the OpenMP library for parallelisation |
|
Use the parallel STL for parallelisation (using TBB or else) |
|
Generate verbose Makefiles (if supported) |
Default values
Option name |
Default value |
|
OFF |
|
OFF |
|
OFF |
|
OFF |
|
OFF |
|
ON |
|
OFF |
|
OFF |
|
OFF |
|
OFF |
|
OFF |
|
OFF |
|
OFF |
|
ON |
|
ON |
|
ON |
|
OFF |
|
OFF |
|
ON |
|
ON |
|
ON |
|
ON |
|
ON |
|
ON |
|
OFF |
|
ON |
Detailed descriptions
CLEAN_3RDPARTY_INSTALL_DIR
This will delete any pre-existing installations within the local installation directory (by default
/path/to/build/.mqlibs
) _except_ the ones that are currently needed based on the hashes of the third-party libraries.DISABLE_FORTRAN_COMPILER
This currently only has an effect when installing Eigen3.
CMake variables
In addition to the above CMake options, you may pass certain special CMake variables in order to customize your build. These are described below in more details.
MQ_FORCE_LOCAL_PKGS
- This variable value is case-insensitive. It may be either of:
a single string (
all
)a comma-separated list of CMake package names for one or more of MindQuantum’s third-party dependencies (e.g.
gmp,eigen3
)
Any or all packages listed will be compiled locally during the CMake configuration process.
MQ_XXX_FORCE_LOCAL
Setting this to a truthful value for one of MindQuantum’s third-party dependencies will result in that/these packages to be compiled locally during the CMake configuration process. Note that the package name
XXX
must be all caps.