Lines Matching +full:cmake +full:- +full:3
1 # See docs/CMake.html for instructions about how to build LLVM with CMake.
3 cmake_minimum_required(VERSION 3.4.3)
15 # CMake 3.1 and higher include generator expressions of the form
24 set(LLVM_VERSION_MAJOR 3)
59 message(STATUS "Found libtool - ${CMAKE_LIBTOOL}")
63 "${CMAKE_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
68 # The following only works with the Ninja generator in CMake >= 3.0.
82 add_definitions(-DLLVM_BUILD_GLOBAL_ISEL)
99 "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
100 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
143 set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\cmake\\\\nsis_logo.bmp")
144 set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\cmake\\\\nsis_icon.ico")
145 set(CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\cmake\\\\nsis_icon.ico")
159 # generate an in-tree build (unless on MSVC_IDE, where it is ok), and to make
164 message(FATAL_ERROR "In-source builds are not allowed.
165 CMake would overwrite the makefiles distributed with LLVM.
166 Please create a directory and run cmake from there, passing the path
179 message(FATAL_ERROR "Apparently there is a previous in-source build,
205 # DLL platform -- put DLLs into bin.
211 # Each of them corresponds to llvm-config's.
212 set(LLVM_TOOLS_BINARY_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) # --bindir
213 set(LLVM_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) # --libdir
214 set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR} ) # --src-root
215 set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR}/include ) # --includedir
216 set(LLVM_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} ) # --prefix
241 CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
244 CACHE STRING "Semicolon-separated list of experimental targets to build.")
260 set(FFI_LIBRARY_DIR "" CACHE PATH "Additional directory, where CMake should search for libffi.so")
261 set(FFI_INCLUDE_DIR "" CACHE PATH "Additional directory, where CMake should search for ffi.h or ffi…
283 option(LLVM_ENABLE_PIC "Build Position-Independent Code" ON)
287 option(LLVM_ENABLE_MODULE_DEBUGGING "Compile with -gmodules." ON)
288 …option(LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY "Compile with -fmodules-local-submodule-visibility."…
290 option(LLVM_ENABLE_MODULE_DEBUGGING "Compile with -gmodules." OFF)
291 …option(LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY "Compile with -fmodules-local-submodule-visibility."…
308 "Enable abi-breaking checks. Can be WITH_ASSERTS, FORCE_ON or FORCE_OFF.")
342 "Use -gsplit-dwarf when compiling llvm." OFF)
365 # Define an option controlling whether we should build for 32-bit on 64-bit
374 set(LIT_ARGS_DEFAULT "-sv")
376 set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
414 "Build compiler-rt as an external project." OFF)
417 # shared library by setting LLVM_DYLIB_COMPONENTS to a semi-colon delimited
418 # list of LLVM components. All component names handled by llvm-config are valid.
421 "Semicolon-separated list of components to include in libLLVM, or \"all\".")
424 option(LLVM_BUILD_LLVM_C_DYLIB "Build libllvm-c re-export library (Darwin Only)" OFF)
444 # A pool size of 1-2 is probably sufficient on a SSD. 3-4 should be fine
459 # first cmake run
460 include(config-ix)
466 # By default, we target the host, but this can be overridden at CMake
474 # Verify that we can find a Python 2 interpreter. Python 3 is unsupported.
475 # FIXME: We should support systems with only Python 3, but that requires work
483 Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
493 # We use llvm-build to generate all the data required by the CMake based
496 # - We generate a file (a CMake fragment) in the object root which contains
497 # all the definitions that are required by CMake.
499 # - We generate the library table used by llvm-config.
501 # - We generate the dependencies for the CMake fragment, so that we will
504 set(LLVMBUILDTOOL "${LLVM_MAIN_SRC_DIR}/utils/llvm-build/llvm-build")
506 "${LLVM_BINARY_DIR}/tools/llvm-config/LibraryDependencies.inc")
508 "${LLVM_BINARY_DIR}/LLVMBuild.cmake")
521 --native-target "${LLVM_NATIVE_ARCH}"
522 --enable-targets "${LLVM_TARGETS_TO_BUILD}"
523 --enable-optional-components "${LLVMOPTIONALCOMPONENTS}"
524 --write-library-table ${LLVMCONFIGLIBRARYDEPENDENCIESINC}
525 --write-cmake-fragment ${LLVMBUILDCMAKEFRAG}
532 # On Win32, CMake doesn't properly handle piping the default output/error
535 message(STATUS "llvm-build output: ${LLVMBUILDOUTPUT}")
539 "Unexpected failure executing llvm-build: ${LLVMBUILDERRORS}")
542 # Include the generated CMake fragment. This will define properties from the
543 # LLVMBuild files in a format which is easy to consume from CMake, and will add
544 # the dependencies so that CMake will reconfigure properly when the LLVMBuild
604 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/config.h.cmake
607 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/llvm-config.h.cmake
608 ${LLVM_INCLUDE_DIR}/llvm/Config/llvm-config.h)
610 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Support/DataTypes.h.cmake
626 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,origin")
627 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,origin")
634 "${CMAKE_EXE_LINKER_FLAGS} -Wl,-lto_library -Wl,${DARWIN_LTO_LIBRARY}")
636 "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-lto_library -Wl,${DARWIN_LTO_LIBRARY}")
638 "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-lto_library -Wl,${DARWIN_LTO_LIBRARY}")
648 "${CMAKE_EXE_LINKER_FLAGS} -Wl,-allow-shlib-undefined")
660 # Dummy use to avoid CMake Wraning: Manually-specified variables were not used
672 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include llvm/Support/Solaris.h")
675 # Make sure we don't get -rdynamic in every binary. For those that need it,
684 add_definitions("-fprofile-instr-use=${LLVM_PROFDATA_FILE}")
694 # People report that -O3 is unreliable on MinGW. The traditional
695 # build also uses -O2 for that reason:
696 llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2")
706 # header-wise on it as they ship all headers from the umbrella folders. Building
723 add_subdirectory(utils/llvm-lit)
724 add_subdirectory(utils/yaml-bench)
760 if(EXISTS ${LLVM_MAIN_SRC_DIR}/projects/test-suite AND TARGET clang)
762 llvm_ExternalProject_Add(test-suite ${LLVM_MAIN_SRC_DIR}/projects/test-suite
782 add_lit_target(check-all
789 add_custom_target(test-depends DEPENDS ${LLVM_LIT_DEPENDS})
790 set_target_properties(test-depends PROPERTIES FOLDER "Tests")
797 add_subdirectory(cmake/modules)
800 install(DIRECTORY include/llvm include/llvm-c
802 COMPONENT llvm-headers
814 COMPONENT llvm-headers
830 -DCMAKE_INSTALL_COMPONENT=llvm-headers
831 -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
839 …message(FATAL_ERROR "LLVM_DISTRIBUTION_COMPONENTS cannot be specified with multi-configuration gen…
843 add_custom_target(install-distribution)
851 if(TARGET install-${target})
852 add_dependencies(install-distribution install-${target})