forked from OSchip/llvm-project
Remove DOS line endings from LLDBStandalone.cmake
llvm-svn: 241361
This commit is contained in:
parent
e86c6fa3dc
commit
e164ad8dfb
|
@ -1,87 +1,87 @@
|
||||||
# If we are not building as a part of LLVM, build LLDB as an
|
# If we are not building as a part of LLVM, build LLDB as an
|
||||||
# standalone project, using LLVM as an external library:
|
# standalone project, using LLVM as an external library:
|
||||||
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||||
project(lldb)
|
project(lldb)
|
||||||
cmake_minimum_required(VERSION 2.8)
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
|
||||||
option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
|
option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
|
||||||
|
|
||||||
set(LLDB_PATH_TO_LLVM_SOURCE "" CACHE PATH
|
set(LLDB_PATH_TO_LLVM_SOURCE "" CACHE PATH
|
||||||
"Path to LLVM source code. Not necessary if using an installed LLVM.")
|
"Path to LLVM source code. Not necessary if using an installed LLVM.")
|
||||||
set(LLDB_PATH_TO_LLVM_BUILD "" CACHE PATH
|
set(LLDB_PATH_TO_LLVM_BUILD "" CACHE PATH
|
||||||
"Path to the directory where LLVM was built or installed.")
|
"Path to the directory where LLVM was built or installed.")
|
||||||
|
|
||||||
set(LLDB_PATH_TO_CLANG_SOURCE "" CACHE PATH
|
set(LLDB_PATH_TO_CLANG_SOURCE "" CACHE PATH
|
||||||
"Path to Clang source code. Not necessary if using an installed Clang.")
|
"Path to Clang source code. Not necessary if using an installed Clang.")
|
||||||
set(LLDB_PATH_TO_CLANG_BUILD "" CACHE PATH
|
set(LLDB_PATH_TO_CLANG_BUILD "" CACHE PATH
|
||||||
"Path to the directory where Clang was built or installed.")
|
"Path to the directory where Clang was built or installed.")
|
||||||
|
|
||||||
if (LLDB_PATH_TO_LLVM_SOURCE)
|
if (LLDB_PATH_TO_LLVM_SOURCE)
|
||||||
if (NOT EXISTS "${LLDB_PATH_TO_LLVM_SOURCE}/cmake/config-ix.cmake")
|
if (NOT EXISTS "${LLDB_PATH_TO_LLVM_SOURCE}/cmake/config-ix.cmake")
|
||||||
message(FATAL_ERROR "Please set LLDB_PATH_TO_LLVM_SOURCE to the root "
|
message(FATAL_ERROR "Please set LLDB_PATH_TO_LLVM_SOURCE to the root "
|
||||||
"directory of LLVM source code.")
|
"directory of LLVM source code.")
|
||||||
else()
|
else()
|
||||||
get_filename_component(LLVM_MAIN_SRC_DIR ${LLDB_PATH_TO_LLVM_SOURCE}
|
get_filename_component(LLVM_MAIN_SRC_DIR ${LLDB_PATH_TO_LLVM_SOURCE}
|
||||||
ABSOLUTE)
|
ABSOLUTE)
|
||||||
list(APPEND CMAKE_MODULE_PATH "${LLVM_MAIN_SRC_DIR}/cmake/modules")
|
list(APPEND CMAKE_MODULE_PATH "${LLVM_MAIN_SRC_DIR}/cmake/modules")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (LLDB_PATH_TO_CLANG_SOURCE)
|
if (LLDB_PATH_TO_CLANG_SOURCE)
|
||||||
get_filename_component(CLANG_MAIN_SRC_DIR ${LLDB_PATH_TO_CLANG_SOURCE}
|
get_filename_component(CLANG_MAIN_SRC_DIR ${LLDB_PATH_TO_CLANG_SOURCE}
|
||||||
ABSOLUTE)
|
ABSOLUTE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake")
|
list(APPEND CMAKE_MODULE_PATH "${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake")
|
||||||
|
|
||||||
get_filename_component(PATH_TO_LLVM_BUILD ${LLDB_PATH_TO_LLVM_BUILD}
|
get_filename_component(PATH_TO_LLVM_BUILD ${LLDB_PATH_TO_LLVM_BUILD}
|
||||||
ABSOLUTE)
|
ABSOLUTE)
|
||||||
|
|
||||||
get_filename_component(PATH_TO_CLANG_BUILD ${LLDB_PATH_TO_CLANG_BUILD}
|
get_filename_component(PATH_TO_CLANG_BUILD ${LLDB_PATH_TO_CLANG_BUILD}
|
||||||
ABSOLUTE)
|
ABSOLUTE)
|
||||||
|
|
||||||
# These variables are used by add_llvm_library.
|
# These variables are used by add_llvm_library.
|
||||||
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
|
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
|
||||||
set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
|
set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
|
||||||
|
|
||||||
include(AddLLVM)
|
include(AddLLVM)
|
||||||
include(HandleLLVMOptions)
|
include(HandleLLVMOptions)
|
||||||
|
|
||||||
# Verify that we can find a Python 2 interpreter. Python 3 is unsupported.
|
# Verify that we can find a Python 2 interpreter. Python 3 is unsupported.
|
||||||
if (PYTHON_EXECUTABLE STREQUAL "")
|
if (PYTHON_EXECUTABLE STREQUAL "")
|
||||||
set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5)
|
set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5)
|
||||||
include(FindPythonInterp)
|
include(FindPythonInterp)
|
||||||
if( NOT PYTHONINTERP_FOUND )
|
if( NOT PYTHONINTERP_FOUND )
|
||||||
message(FATAL_ERROR
|
message(FATAL_ERROR
|
||||||
"Unable to find Python interpreter, required for builds and testing.
|
"Unable to find Python interpreter, required for builds and testing.
|
||||||
Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
|
Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
message("-- Found PythonInterp: ${PYTHON_EXECUTABLE}")
|
message("-- Found PythonInterp: ${PYTHON_EXECUTABLE}")
|
||||||
endif()
|
endif()
|
||||||
# Import CMake library targets from LLVM and Clang.
|
# Import CMake library targets from LLVM and Clang.
|
||||||
include("${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVMConfig.cmake")
|
include("${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVMConfig.cmake")
|
||||||
include("${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake")
|
include("${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake")
|
||||||
|
|
||||||
set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
|
set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
|
||||||
|
|
||||||
set(LLVM_MAIN_INCLUDE_DIR "${LLVM_MAIN_SRC_DIR}/include")
|
set(LLVM_MAIN_INCLUDE_DIR "${LLVM_MAIN_SRC_DIR}/include")
|
||||||
set(LLVM_BINARY_DIR ${CMAKE_BINARY_DIR})
|
set(LLVM_BINARY_DIR ${CMAKE_BINARY_DIR})
|
||||||
|
|
||||||
set(CLANG_MAIN_INCLUDE_DIR "${CLANG_MAIN_SRC_DIR}/include")
|
set(CLANG_MAIN_INCLUDE_DIR "${CLANG_MAIN_SRC_DIR}/include")
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
include_directories("${PATH_TO_LLVM_BUILD}/include"
|
include_directories("${PATH_TO_LLVM_BUILD}/include"
|
||||||
"${LLVM_MAIN_INCLUDE_DIR}"
|
"${LLVM_MAIN_INCLUDE_DIR}"
|
||||||
"${PATH_TO_CLANG_BUILD}/include"
|
"${PATH_TO_CLANG_BUILD}/include"
|
||||||
"${CLANG_MAIN_INCLUDE_DIR}"
|
"${CLANG_MAIN_INCLUDE_DIR}"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/source")
|
"${CMAKE_CURRENT_SOURCE_DIR}/source")
|
||||||
link_directories("${PATH_TO_LLVM_BUILD}/lib${LLVM_LIBDIR_SUFFIX}"
|
link_directories("${PATH_TO_LLVM_BUILD}/lib${LLVM_LIBDIR_SUFFIX}"
|
||||||
"${PATH_TO_CLANG_BUILD}/lib${LLVM_LIBDIR_SUFFIX}")
|
"${PATH_TO_CLANG_BUILD}/lib${LLVM_LIBDIR_SUFFIX}")
|
||||||
|
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
|
||||||
|
|
||||||
set(LLDB_BUILT_STANDALONE 1)
|
set(LLDB_BUILT_STANDALONE 1)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue