Fix for ROOT-7184 - CMake config issue when enabling cling tests
This commit is contained in:
parent
94dace589c
commit
20e2f24106
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user