Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Tusooa Zhu
Krita
Commits
b7dc4df9
Commit
b7dc4df9
authored
Sep 02, 2015
by
Friedrich W. H. Kossebau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move all KDE4_BUILD_TESTS to BUILD_TESTING
Also remove all duplicated add_definitions(-DCOMPILING_TESTS)
parent
31529bc8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
32 deletions
+13
-32
CMakeLists.txt
CMakeLists.txt
+5
-13
cmake/modules/MacroCalligraAddBenchmark.cmake
cmake/modules/MacroCalligraAddBenchmark.cmake
+1
-1
cmake/transitional/KDE4Macros.cmake
cmake/transitional/KDE4Macros.cmake
+5
-5
libs/flake/CMakeLists.txt
libs/flake/CMakeLists.txt
+0
-5
libs/kopageapp/CMakeLists.txt
libs/kopageapp/CMakeLists.txt
+0
-6
libs/koplugin/CMakeLists.txt
libs/koplugin/CMakeLists.txt
+1
-1
libs/kotext/kohyphen/CMakeLists.txt
libs/kotext/kohyphen/CMakeLists.txt
+1
-1
No files found.
CMakeLists.txt
View file @
b7dc4df9
...
...
@@ -19,17 +19,6 @@ if(${CMAKE_VERSION} VERSION_GREATER 3.0.0)
cmake_policy
(
SET CMP0046 OLD
)
endif
()
# QT5TODO: remove KDE4_BUILD_TESTS post-3.0
# transitional forward compatibility:
# BUILD_TESTING is cmake standard, KDE4_BUILD_TESTS not used by ECM/KF5
# have BUILD_TESTING overrule KDE4_BUILD_TESTS if set
# slightly broken approach, if a cache exists then unsetting tests will need both
# BUILD_TESTING and KDE4_BUILD_TESTS to be set to FALSE
# better fixes welcome
if
(
BUILD_TESTING
)
set
(
KDE4_BUILD_TESTS TRUE
)
endif
()
######################
#######################
## Constants defines ##
...
...
@@ -258,8 +247,11 @@ else()
set
(
HAVE_X11 FALSE
)
endif
()
# only with this definition will the FOO_TEST_EXPORT macro do something
if
(
KDE4_BUILD_TESTS
)
# only with this definition will all the FOO_TEST_EXPORT macro do something
# TODO: check if this can be moved to only those places which make use of it,
# to reduce global compiler definitions that would trigger a recompile of
# everything on a change (like adding/removing tests to/from the build)
if
(
BUILD_TESTING
)
add_definitions
(
-DCOMPILING_TESTS
)
endif
()
...
...
cmake/modules/MacroCalligraAddBenchmark.cmake
View file @
b7dc4df9
...
...
@@ -69,7 +69,7 @@ macro (CALLIGRA_ADD_BENCHMARK _test_NAME)
if
(
NOT MSVC_IDE
)
#not needed for the ide
# if the tests are EXCLUDE_FROM_ALL, add a target "buildtests" to build all tests
if
(
NOT
KDE4_
BUILD_TEST
S
)
if
(
NOT BUILD_TEST
ING
)
get_directory_property
(
_buildtestsAdded BUILDTESTS_ADDED
)
if
(
NOT _buildtestsAdded
)
add_custom_target
(
buildtests
)
...
...
cmake/transitional/KDE4Macros.cmake
View file @
b7dc4df9
...
...
@@ -271,7 +271,7 @@ endmacro (KDE4_ADD_KDEINIT_EXECUTABLE)
# Add a unit test, which is executed when running make test .
# The targets are always created, but only built for the "all"
# target if the option
KDE4_
BUILD_TEST
S
is enabled. Otherwise the rules for the target
# target if the option BUILD_TEST
ING
is enabled. Otherwise the rules for the target
# are created but not built by default. You can build them by manually building the target.
# The name of the target can be specified using TESTNAME <testname>, if it is not given
# the macro will default to the <name>
...
...
@@ -334,14 +334,14 @@ macro (KDE4_ADD_UNIT_TEST _test_NAME)
if
(
NOT MSVC_IDE
)
#not needed for the ide
# if the tests are EXCLUDE_FROM_ALL, add a target "buildtests" to build all tests
if
(
NOT
KDE4_
BUILD_TEST
S
)
if
(
NOT BUILD_TEST
ING
)
get_directory_property
(
_buildtestsAdded BUILDTESTS_ADDED
)
if
(
NOT _buildtestsAdded
)
add_custom_target
(
buildtests
)
set_directory_properties
(
PROPERTIES BUILDTESTS_ADDED TRUE
)
endif
(
NOT _buildtestsAdded
)
add_dependencies
(
buildtests
${
_test_NAME
}
)
endif
(
NOT
KDE4_
BUILD_TEST
S
)
endif
(
NOT BUILD_TEST
ING
)
endif
(
NOT MSVC_IDE
)
endmacro
(
KDE4_ADD_UNIT_TEST
)
...
...
@@ -425,9 +425,9 @@ macro (KDE4_ADD_EXECUTABLE _target_NAME)
set
(
_add_executable_param
)
endif
(
_nogui
)
if
(
_test AND NOT
KDE4_
BUILD_TEST
S
)
if
(
_test AND NOT BUILD_TEST
ING
)
set
(
_add_executable_param
${
_add_executable_param
}
EXCLUDE_FROM_ALL
)
endif
(
_test AND NOT
KDE4_
BUILD_TEST
S
)
endif
(
_test AND NOT BUILD_TEST
ING
)
add_executable
(
${
_target_NAME
}
${
_add_executable_param
}
${
_SRCS
}
)
...
...
libs/flake/CMakeLists.txt
View file @
b7dc4df9
...
...
@@ -2,11 +2,6 @@ project(flake)
include_directories
(
${
FLAKE_INCLUDES
}
)
if
(
KDE4_BUILD_TESTS
)
# only with this definition will the FLAKE_TEST_EXPORT macro do something
add_definitions
(
-DCOMPILING_TESTS
)
endif
()
add_subdirectory
(
styles
)
add_subdirectory
(
tests
)
add_subdirectory
(
pics
)
...
...
libs/kopageapp/CMakeLists.txt
View file @
b7dc4df9
...
...
@@ -2,12 +2,6 @@ include_directories(
${
KOPAGEAPP_INCLUDES
}
)
if
(
KDE4_BUILD_TESTS
)
# only with this definition will the KOPAGEAPP_TEST_EXPORT macro do something
add_definitions
(
-DCOMPILING_TESTS
)
endif
()
add_subdirectory
(
tests
)
add_subdirectory
(
tools
)
...
...
libs/koplugin/CMakeLists.txt
View file @
b7dc4df9
...
...
@@ -5,7 +5,7 @@ set(koplugin_LIB_SRCS
)
# help plugin trader find installed plugins when run from uninstalled tests
if
(
KDE4_
BUILD_TEST
S
)
if
(
BUILD_TEST
ING
)
add_definitions
(
-DCMAKE_INSTALL_PREFIX=
"
${
CMAKE_INSTALL_PREFIX
}
"
)
endif
()
...
...
libs/kotext/kohyphen/CMakeLists.txt
View file @
b7dc4df9
...
...
@@ -2,7 +2,7 @@
add_subdirectory
(
hyphdicts
)
if
(
KDE4_
BUILD_TEST
S
)
if
(
BUILD_TEST
ING
)
include_directories
(
${
KOMAIN_INCLUDES
}
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
KDE4_ENABLE_EXCEPTIONS
}
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment