diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index d5abc85d..00c22081 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -8,7 +8,8 @@ add_subdirectory(Interpreter) add_subdirectory(MetaProcessor) -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/UserInterface/textinput) +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/UserInterface/textinput OR + CLING_INCLUDE_TESTS) add_subdirectory(UserInterface) endif() add_subdirectory(Utils) diff --git a/lib/UserInterface/CMakeLists.txt b/lib/UserInterface/CMakeLists.txt index 3b7968e5..e12d0bc5 100644 --- a/lib/UserInterface/CMakeLists.txt +++ b/lib/UserInterface/CMakeLists.txt @@ -8,22 +8,27 @@ set(LLVM_REQUIRES_EH true) +if(NOT EXISTS textinput) + set(TEXTINPUTSRC ${CMAKE_SOURCE_DIR}/core/textinput/src/) + include_directories(${TEXTINPUTSRC}) +endif() + add_cling_library(clingUserInterface UserInterface.cpp - textinput/Editor.cpp - textinput/History.cpp - textinput/KeyBinding.cpp - textinput/Range.cpp - textinput/SignalHandler.cpp - textinput/StreamReader.cpp - textinput/StreamReaderUnix.cpp - textinput/StreamReaderWin.cpp - textinput/TerminalConfigUnix.cpp - textinput/TerminalDisplay.cpp - textinput/TerminalDisplayUnix.cpp - textinput/TerminalDisplayWin.cpp - textinput/TextInput.cpp - textinput/TextInputContext.cpp + ${TEXTINPUTSRC}textinput/Editor.cpp + ${TEXTINPUTSRC}textinput/History.cpp + ${TEXTINPUTSRC}textinput/KeyBinding.cpp + ${TEXTINPUTSRC}textinput/Range.cpp + ${TEXTINPUTSRC}textinput/SignalHandler.cpp + ${TEXTINPUTSRC}textinput/StreamReader.cpp + ${TEXTINPUTSRC}textinput/StreamReaderUnix.cpp + ${TEXTINPUTSRC}textinput/StreamReaderWin.cpp + ${TEXTINPUTSRC}textinput/TerminalConfigUnix.cpp + ${TEXTINPUTSRC}textinput/TerminalDisplay.cpp + ${TEXTINPUTSRC}textinput/TerminalDisplayUnix.cpp + ${TEXTINPUTSRC}textinput/TerminalDisplayWin.cpp + ${TEXTINPUTSRC}textinput/TextInput.cpp + ${TEXTINPUTSRC}textinput/TextInputContext.cpp ) #Look for textinput in current ROOT source tree diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 16d855c5..c113cdb5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -75,6 +75,19 @@ if(PYTHONINTERP_FOUND) ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Running Cling regression tests") +add_custom_command(OUTPUT cling-headers.stamp + COMMAND ${CMAKE_COMMAND} -E copy_directory + ${CMAKE_CURRENT_SOURCE_DIR}/../../llvm/src/include/llvm + ${CMAKE_CURRENT_BINARY_DIR}/../../llvm/src/include/llvm + COMMAND ${CMAKE_COMMAND} -E copy_directory + ${CMAKE_CURRENT_SOURCE_DIR}/../../llvm/src/tools/clang/include/clang + ${CMAKE_CURRENT_BINARY_DIR}/../../llvm/src/include/clang + COMMAND ${CMAKE_COMMAND} -E copy_directory + ${CMAKE_CURRENT_BINARY_DIR}/../../llvm/src/tools/clang/include/clang + ${CMAKE_CURRENT_BINARY_DIR}/../../llvm/src/include/clang + COMMAND ${CMAKE_COMMAND} -E touch cling-headers.stamp) +add_custom_target(cling-headers DEPENDS cling-headers.stamp) + # if( NOT CLING_BUILT_STANDALONE ) # add_custom_target(check-all # COMMAND ${PYTHON_EXECUTABLE} @@ -98,7 +111,5 @@ if(PYTHONINTERP_FOUND) add_dependencies(cling-test cling-test.deps) add_dependencies(cling-test.deps - cling cling-headers c-index-test diagtool arcmt-test c-arcmt-test - ) - + cling cling-headers clang FileCheck c-index-test diagtool arcmt-test c-arcmt-test) endif() diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 961db625..9fcb35a6 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -7,7 +7,8 @@ #------------------------------------------------------------------------------ -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../lib/UserInterface/textinput) +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../lib/UserInterface/textinput + OR CLING_INCLUDE_TESTS) add_subdirectory(driver) endif()