LLVM_BUILD_32_BITS:BOOL Build 32-bit executables and libraries on 64-bit systems. Is not ABI compatible with a version built without it. A version of LLVM built with ABI breaking checks (off) irrespective of whether normal ( NDEBUG-based) assertions areĮnabled or not. WITH_ASSERTS turns on ABI breaking checks in anĪssertion enabled build. Allowed values are WITH_ASSERTS (default), FORCE_ON andįORCE_OFF.
LLVM_ABI_BREAKING_CHECKS:STRING Used to decide if LLVM should be built with ABI breaking checks or LLVM_ENABLE_WERROR:BOOL Stop and fail the build, if a compiler warning is triggered. This disables compiler-specific extensions, if LLVM_ENABLE_PEDANTIC:BOOL Enable pedantic mode. LLVM_ENABLE_WARNINGS:BOOL Enable all compiler warnings. LLVM_ENABLE_RTTI:BOOL Build LLVM with run-time type information. Some systems, like Windows, do not need this flag. LLVM_ENABLE_PIC:BOOL Add the -fPIC flag to the compiler command-line, if the compiler supports
#CMAKE INSTALL PRFIX MANUAL#
Scenario where a manual override may be desirable is when using Visual StudioĢ017’s CMake integration, which would not be detected as an IDE otherwise. This is usually autodetected, but it can beĬonfigured manually to explicitly control the generation of those targets. Install-* and check-* targets, since IDEs don’t always deal well withĪ large number of targets. This in turn disables theĬreation of certain convenience build system targets, such as the various LLVM_ENABLE_IDE:BOOL Tell the build system that an IDE is being used. LLVM_ENABLE_EXPENSIVE_CHECKS:BOOL Enable additional time/memory expensive checking. That need to propagate through LLVM code.
#CMAKE INSTALL PRFIX CODE#
Link against LLVM libraries and make use of C++ exceptions in your own code LLVM_ENABLE_EH:BOOL Build LLVM with exception-handling support. Defaults to ON if and only if CMAKE_BUILD_TYPE LLVM_ENABLE_ASSERTIONS:BOOL Enables code assertions. LLVM_CXX_STD:STRING Build with the specified C++ standard. LLVM_ENABLE_UNWIND_TABLES:BOOL Enable unwind tables in the binary. LLVM_ENABLE_THREADS:BOOL Build with threads support, if available. Need revision info can disable this option to avoid re-linking most binariesĪfter a branch switch. The version info is provided by the LLVM_REVISION macro in LLVM_APPEND_VC_REV:BOOL Embed version control revision info (svn revision number or Git revision id). LLVM_INCLUDE_BENCHMARKS:BOOL Generate build targets for the LLVM benchmarks. LLVM_BUILD_BENCHMARKS:BOOL Adds benchmarks to the list of default targets. This option to disable the generation of build targets for the LLVM unit
LLVM_INCLUDE_TESTS:BOOL Generate build targets for the LLVM unit tests. (Search for add_llvm_unittest in the subdirectories of unittestsįor a complete list of unit tests.) It is possible to build all unit tests Targets defined under unittests, such as ADTTests, IRTests, SupportTests,Įtc. You can build a specific unit test using the Targets for building each unit testĪre generated in any case. LLVM_BUILD_TESTS:BOOL Build LLVM unit tests. Option to disable the generation of build targets for the LLVM examples. LLVM_INCLUDE_EXAMPLES:BOOL Generate build targets for the LLVM examples. See documentation for LLVM_BUILD_TOOLS above for moreĭetails. LLVM_BUILD_EXAMPLES:BOOL Build LLVM examples. LLVM_INSTALL_BINUTILS_SYMLINKS:BOOL Install symlinks from the binutils tool names to the corresponding LLVM tools.įor example, ar will be symlinked to llvm-ar. Option to disable the generation of build targets for the LLVM tools. LLVM_INCLUDE_TOOLS:BOOL Generate build targets for the LLVM tools. Llvm-as at the root of your build directory. ForĮxample, you can build llvm-as with a Makefile-based system by executing make You can build a tool separately by invoking its target. Targets for building each tool are generated LLVM-specific variables ¶ LLVM_TARGETS_TO_BUILD:STRING Semicolon-separated list of targets to build, or all for building all CMAKE_CXX_FLAGS:STRING Extra flags to use when compiling C++ source files. CMAKE_C_FLAGS:STRING Extra flags to use when compiling C source files. On a 64-bit architecture, one could use -DLLVM_LIBDIR_SUFFIX=64 LLVM_LIBDIR_SUFFIX:STRING Extra suffix to append to the directory where libraries are to be CMAKE_INSTALL_PREFIX:PATH Path where LLVM will be installed if “make install” is invoked or the Visual Studio, you should use the IDE settings to set the build type.īe aware that Release and RelWithDebInfo use different optimization levels on Release, Debug, RelWithDebInfo and MinSizeRel. CMAKE_BUILD_TYPE:STRING Sets the build type for make-based generators.
#CMAKE INSTALL PRFIX FULL#
For full documentation, consult theĬMake manual, or execute cmake -help-variable VARIABLE_NAME. Here are some of the CMake variables that are used often, along with aīrief explanation and LLVM-specific notes.