1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
|
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories(
${KDevelop_SOURCE_DIR}/languages/cpp
${KDevelop_BINARY_DIR}/languages/cpp
)
set(setuphelpers_SRCS
../setuphelpers.cpp
)
if(MSVC)
list(APPEND setuphelpers_SRCS ../setuphelpers_msvc.cpp)
endif(MSVC)
set(test_common_SRCS
../codecompletion/context.cpp
../codecompletion/helpers.cpp
../codecompletion/implementationhelperitem.cpp
../codecompletion/item.cpp
../codecompletion/missingincludeitem.cpp
../codecompletion/model.cpp
../codecompletion/worker.cpp
../codegen/simplerefactoring.cpp
../codegen/unresolvedincludeassistant.cpp
../codegen/customincludepaths.cpp
../cpphighlighting.cpp
../cpputils.cpp
../includepathcomputer.cpp
../includepathresolver.cpp
../quickopen.cpp
${setuphelpers_SRCS}
)
########### next target ###############
set(buddiestest_SRCS
test_buddies.cpp
)
kde4_add_unit_test(buddiestest ${buddiestest_SRCS})
target_link_libraries(buddiestest
${QT_QTTEST_LIBRARY}
${QT_QTCORE_LIBRARY}
${KDEVPLATFORM_LANGUAGE_LIBRARIES}
${KDEVPLATFORM_PROJECT_LIBRARIES}
${KDEVPLATFORM_TESTS_LIBRARIES}
${KDEVPLATFORM_SUBLIME_LIBRARIES}
)
########### next target ###############
# Also check that kdevplatform is built with JSON support
# see: https://bugs.kde.org/show_bug.cgi?id=327095
if(QJSON_FOUND AND KDEVPLATFORM_JSONTESTS_LIBRARIES)
set(cppfilestest_SRCS test_cppfiles.cpp)
kde4_add_unit_test(cppfilestest ${cppfilestest_SRCS})
configure_file("testfilepaths.h.cmake" "testfilepaths.h" ESCAPE_QUOTES)
target_link_libraries(cppfilestest
${QT_QTTEST_LIBRARY}
${QT_QTCORE_LIBRARY}
${KDEVPLATFORM_LANGUAGE_LIBRARIES}
${KDEVPLATFORM_TESTS_LIBRARIES}
${KDEVPLATFORM_JSONTESTS_LIBRARIES}
kdev4cppduchain
)
endif()
########### next target ###############
set(specialcompletiontest_SRCS
test_specialcompletion.cpp
${test_common_SRCS}
)
kde4_add_unit_test(cppspecialcompletion ${specialcompletiontest_SRCS})
target_link_libraries(cppspecialcompletion
kdev4cppduchain
kdev4cpprpp
kdev4cppparser
${QT_QTTEST_LIBRARY}
${QT_QTCORE_LIBRARY}
${KDEVPLATFORM_LANGUAGE_LIBRARIES}
${KDEVPLATFORM_PROJECT_LIBRARIES}
${KDEVPLATFORM_TESTS_LIBRARIES}
)
add_dependencies(cppspecialcompletion kdevcpplanguagesupport)
########### next target ###############
set(cppassistantstest_SRCS
${test_common_SRCS}
test_cppassistants.cpp
../codegen/adaptsignatureassistant.cpp
../codegen/adaptsignatureaction.cpp
)
kde4_add_unit_test(cppassistantstest ${cppassistantstest_SRCS})
target_link_libraries(cppassistantstest ${QT_QTTEST_LIBRARY}
kdev4cppduchain
kdev4cpprpp
kdev4cppparser
${KDEVPLATFORM_INTERFACES_LIBRARIES}
${KDEVPLATFORM_PROJECT_LIBRARIES}
${KDE4_THREADWEAVER_LIBRARIES}
${KDEVPLATFORM_LANGUAGE_LIBRARIES}
${KDEVPLATFORM_TESTS_LIBRARIES}
${KDE4_KDECORE_LIBS}
${KDE4_KTEXTEDITOR_LIBS}
)
add_dependencies(cppassistantstest kdevcpplanguagesupport)
add_definitions(-DTEST_COMPLETION)
set(cppcodecompletiontest_SRCS
test_cppcodecompletion.cpp
${test_common_SRCS}
)
set(cppcodegentest_SRCS
test_cppcodegen.cpp
../codegen/simplerefactoring.cpp
../codegen/unresolvedincludeassistant.cpp
../codegen/customincludepaths.cpp
../cpputils.cpp
../includepathcomputer.cpp
../includepathresolver.cpp
${setuphelpers_SRCS}
)
add_definitions(-DBUILD_TESTS)
kde4_add_unit_test(cppcodecompletiontest ${cppcodecompletiontest_SRCS})
target_link_libraries(cppcodecompletiontest ${QT_QTTEST_LIBRARY}
kdev4cppduchain
kdev4cpprpp
kdev4cppparser
${KDEVPLATFORM_INTERFACES_LIBRARIES}
${KDEVPLATFORM_PROJECT_LIBRARIES}
${KDE4_THREADWEAVER_LIBRARIES}
${KDEVPLATFORM_LANGUAGE_LIBRARIES}
${KDEVPLATFORM_TESTS_LIBRARIES}
${KDE4_KDECORE_LIBS}
${KDE4_KTEXTEDITOR_LIBS}
)
add_dependencies(cppcodecompletiontest kdevcpplanguagesupport)
kde4_add_unit_test(cppcodegentest ${cppcodegentest_SRCS})
target_link_libraries(cppcodegentest
kdev4cppduchain
kdev4cpprpp
kdev4cppparser
${QT_QTTEST_LIBRARY}
${QT_QTCORE_LIBRARY}
${KDEVPLATFORM_LANGUAGE_LIBRARIES}
${KDEVPLATFORM_PROJECT_LIBRARIES}
${KDEVPLATFORM_TESTS_LIBRARIES}
)
add_dependencies(cppcodegentest kdevcpplanguagesupport)
kde4_add_executable( cpp-parser cpp-parser.cpp )
target_link_libraries(cpp-parser
${QT_QTCORE_LIBRARY} ${KDEVPLATFORM_TESTS_LIBRARIES} ${KDEVPLATFORM_LANGUAGE_LIBRARIES}
kdev4cppparser kdev4cppduchain kdev4cpprpp)
|