mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-04 05:17:07 +00:00
CMake: Introduce LLVM_CLANG_SOURCE_DIR, "tools/clang" by default. Clang will not be built if LLVM_CLANG_SOURCE_DIR="" or ${LLVM_CLANG_SOURCE_DIR}/CMakeLists.txt is not found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142103 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -351,6 +351,11 @@
|
|||||||
Function Interface library. If the library or its headers are
|
Function Interface library. If the library or its headers are
|
||||||
installed on a custom location, you can set the variables
|
installed on a custom location, you can set the variables
|
||||||
FFI_INCLUDE_DIR and FFI_LIBRARY_DIR. Defaults to OFF.</dd>
|
FFI_INCLUDE_DIR and FFI_LIBRARY_DIR. Defaults to OFF.</dd>
|
||||||
|
|
||||||
|
<dt><b>LLVM_CLANG_SOURCE_DIR</b>:PATH</dt>
|
||||||
|
<dd>Path to Clang's source directory. Defaults to tools/clang.
|
||||||
|
Clang will not be built when it is empty or it does not point valid
|
||||||
|
path.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -59,11 +59,14 @@ if( LLVM_ENABLE_PIC )
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
|
set(LLVM_CLANG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/clang" CACHE PATH "Path to Clang source directory")
|
||||||
|
|
||||||
|
if (NOT ${LLVM_CLANG_SOURCE_DIR} STREQUAL ""
|
||||||
|
AND EXISTS ${LLVM_CLANG_SOURCE_DIR}/CMakeLists.txt)
|
||||||
option(LLVM_BUILD_CLANG "Whether to build Clang as part of LLVM" ON)
|
option(LLVM_BUILD_CLANG "Whether to build Clang as part of LLVM" ON)
|
||||||
if (${LLVM_BUILD_CLANG})
|
if (${LLVM_BUILD_CLANG})
|
||||||
add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/clang )
|
add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/clang )
|
||||||
endif()
|
endif()
|
||||||
endif( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
|
endif ()
|
||||||
|
|
||||||
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)
|
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)
|
||||||
|
|||||||
Reference in New Issue
Block a user