blob: 79654840d54290637c5461568b61b1e62f8bd660 (
plain)
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
|
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
|