summaryrefslogtreecommitdiff
path: root/dev-util/kdevelop-css/files
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2017-10-22 13:21:01 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2017-10-22 13:21:01 +0200
commit9cfae1197d9b99643ea11bffe8af55a7ac4ae05c (patch)
tree84d2fa62e66a079070d062e667b4b9f453746daa /dev-util/kdevelop-css/files
parent7e51518e421b911554262dd5859372e7c8aa7226 (diff)
downloadkde-9cfae1197d9b99643ea11bffe8af55a7ac4ae05c.tar.gz
kde-9cfae1197d9b99643ea11bffe8af55a7ac4ae05c.tar.bz2
kde-9cfae1197d9b99643ea11bffe8af55a7ac4ae05c.zip
dev-util/kdevelop-css: Make tests optional, fix test DEPEND
Reported-by: Johannes Hirte <johannes.hirte@datenkhaos.de> Gentoo-bug: 630928 Package-Manager: Portage-2.3.12, Repoman-2.3.3
Diffstat (limited to 'dev-util/kdevelop-css/files')
-rw-r--r--dev-util/kdevelop-css/files/kdevelop-css-tests.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/dev-util/kdevelop-css/files/kdevelop-css-tests.patch b/dev-util/kdevelop-css/files/kdevelop-css-tests.patch
new file mode 100644
index 00000000000..79654840d54
--- /dev/null
+++ b/dev-util/kdevelop-css/files/kdevelop-css-tests.patch
@@ -0,0 +1,50 @@
+From 7a32e32d55f6e765798098790beda88b0dc5eb7a Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 22 Oct 2017 13:12:10 +0200
+Subject: [PATCH] Make tests conditional on BUILD_TESTING
+
+They depend on kdevelop being built with tests.
+---
+ CMakeLists.txt | 2 ++
+ parser/CMakeLists.txt | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4d25a98..c310b9e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -88,6 +88,7 @@ target_link_libraries(kdevcsssupport
+ # kdebugsettings file
+ install(FILES kdevcsssupport.categories DESTINATION ${KDE_INSTALL_CONFDIR})
+
++if(BUILD_TESTING)
+ ### next target
+ set(completionmodeltest_SRCS
+ completion/test/modeltest.cpp
+@@ -139,5 +140,6 @@ ecm_add_test(${parsejobtest_SRCS}
+ KDev::Interfaces KDev::Language KDev::Tests
+ KF5::I18n KF5::TextEditor
+ )
++endif()
+
+ feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
+diff --git a/parser/CMakeLists.txt b/parser/CMakeLists.txt
+index e9014f8..91afa21 100644
+--- a/parser/CMakeLists.txt
++++ b/parser/CMakeLists.txt
+@@ -47,6 +47,7 @@ target_link_libraries( kdev4cssparser LINK_PRIVATE
+ )
+ install(TARGETS kdev4cssparser DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS})
+
++if(BUILD_TESTING)
+ ### next target
+ add_executable(css-parser ${CMAKE_CURRENT_BINARY_DIR}/tokenizer.cpp main.cpp)
+ target_link_libraries(css-parser
+@@ -71,3 +72,4 @@ ecm_add_test(${parsertest_SRCS}
+ KDev::Language
+ KDev::Tests
+ )
++endif()
+--
+2.14.2
+