aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2019-06-03 15:07:27 +0200
committerCristian Adam <cristian.adam@qt.io>2019-06-05 08:28:49 +0000
commit0439eea6bcbff70a4aacfee3d0dc048f9c402131 (patch)
tree91efaf050c58d2eadee9c36294a6f97597d70662
parentb15fce086eac752bf25edd5eb138f92df7e2ce4f (diff)
CMake build: Skip installation of test plugins / executables
Our tests run from the build folder. We do not need to install them. Change-Id: Iaeb27e466fe0d43bc15fa3eee3bf6d2659b87083 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
-rw-r--r--src/CMakeLists.txt20
-rw-r--r--tests/auto/extensionsystem/pluginmanager/circularplugins/plugin1/CMakeLists.txt1
-rw-r--r--tests/auto/extensionsystem/pluginmanager/circularplugins/plugin2/CMakeLists.txt1
-rw-r--r--tests/auto/extensionsystem/pluginmanager/circularplugins/plugin3/CMakeLists.txt1
-rw-r--r--tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin1/CMakeLists.txt1
-rw-r--r--tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin2/CMakeLists.txt1
-rw-r--r--tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin3/CMakeLists.txt1
-rw-r--r--tests/auto/extensionsystem/pluginspec/testplugin/CMakeLists.txt1
-rw-r--r--tests/unit/echoserver/CMakeLists.txt1
9 files changed, 20 insertions, 8 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 01fb642e91..b59ba91aec 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -213,7 +213,7 @@ endfunction()
function(add_qtc_plugin target_name)
cmake_parse_arguments(_arg
- "EXPERIMENTAL;SKIP_DEBUG_CMAKE_FILE_CHECK"
+ "EXPERIMENTAL;SKIP_DEBUG_CMAKE_FILE_CHECK;SKIP_INSTALL"
"VERSION;COMPAT_VERSION;PLUGIN_JSON_IN;PLUGIN_PATH;PLUGIN_NAME;OUTPUT_NAME"
"CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;INCLUDES;PUBLIC_INCLUDES;PLUGIN_DEPENDS;PLUGIN_RECOMMENDS;SOURCES;EXPLICIT_MOC"
${ARGN}
@@ -361,11 +361,13 @@ function(add_qtc_plugin target_name)
set_explicit_moc(${target_name} "${file}")
endforeach()
- install(TARGETS ${target_name}
- LIBRARY DESTINATION "${plugin_dir}"
- ARCHIVE DESTINATION "${plugin_dir}"
- RUNTIME DESTINATION "${plugin_dir}"
- )
+ if (NOT _arg_SKIP_INSTALL)
+ install(TARGETS ${target_name}
+ LIBRARY DESTINATION "${plugin_dir}"
+ ARCHIVE DESTINATION "${plugin_dir}"
+ RUNTIME DESTINATION "${plugin_dir}"
+ )
+ endif()
endfunction()
function(extend_qtc_target target_name)
@@ -419,7 +421,7 @@ function(extend_qtc_plugin target_name)
endfunction()
function(add_qtc_executable name)
- cmake_parse_arguments(_arg "" "DESTINATION" "DEFINES;DEPENDS;INCLUDES;SOURCES;PROPERTIES" ${ARGN})
+ cmake_parse_arguments(_arg "SKIP_INSTALL" "DESTINATION" "DEFINES;DEPENDS;INCLUDES;SOURCES;PROPERTIES" ${ARGN})
if ($_arg_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "add_qtc_executable had unparsed arguments!")
@@ -469,7 +471,9 @@ function(add_qtc_executable name)
${_arg_PROPERTIES}
)
- install(TARGETS ${name} DESTINATION "${_DESTINATION}")
+ if (NOT _arg_SKIP_INSTALL)
+ install(TARGETS ${name} DESTINATION "${_DESTINATION}")
+ endif()
endfunction()
function(extend_qtc_executable name)
diff --git a/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin1/CMakeLists.txt b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin1/CMakeLists.txt
index b5d95b8c91..0d3e8e3858 100644
--- a/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin1/CMakeLists.txt
+++ b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin1/CMakeLists.txt
@@ -3,4 +3,5 @@ add_qtc_plugin(plugin1
SOURCES
plugin1.cpp plugin1.h
PLUGIN_PATH "${TEST_PLUGIN_PATH}"
+ SKIP_INSTALL
)
diff --git a/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin2/CMakeLists.txt b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin2/CMakeLists.txt
index bb862240ea..fd58e173c2 100644
--- a/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin2/CMakeLists.txt
+++ b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin2/CMakeLists.txt
@@ -3,4 +3,5 @@ add_qtc_plugin(plugin2
SOURCES
plugin2.cpp plugin2.h
PLUGIN_PATH "${TEST_PLUGIN_PATH}"
+ SKIP_INSTALL
)
diff --git a/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin3/CMakeLists.txt b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin3/CMakeLists.txt
index 211ce4ab30..dec94785f1 100644
--- a/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin3/CMakeLists.txt
+++ b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin3/CMakeLists.txt
@@ -3,4 +3,5 @@ add_qtc_plugin(plugin3
SOURCES
plugin3.cpp plugin3.h
PLUGIN_PATH "${TEST_PLUGIN_PATH}"
+ SKIP_INSTALL
)
diff --git a/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin1/CMakeLists.txt b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin1/CMakeLists.txt
index 737cf2a9f7..6302992c2a 100644
--- a/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin1/CMakeLists.txt
+++ b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin1/CMakeLists.txt
@@ -4,4 +4,5 @@ add_qtc_plugin(correct_plugin1
SOURCES
plugin1.cpp plugin1.h
PLUGIN_PATH "${TEST_PLUGIN_PATH}"
+ SKIP_INSTALL
)
diff --git a/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin2/CMakeLists.txt b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin2/CMakeLists.txt
index 9a366d4b03..075a08e58d 100644
--- a/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin2/CMakeLists.txt
+++ b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin2/CMakeLists.txt
@@ -4,4 +4,5 @@ add_qtc_plugin(correct_plugin2
SOURCES
plugin2.cpp plugin2.h
PLUGIN_PATH "${TEST_PLUGIN_PATH}"
+ SKIP_INSTALL
)
diff --git a/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin3/CMakeLists.txt b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin3/CMakeLists.txt
index 8564a2a21d..2326ac08b4 100644
--- a/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin3/CMakeLists.txt
+++ b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin3/CMakeLists.txt
@@ -4,4 +4,5 @@ add_qtc_plugin(correct_plugin3
SOURCES
plugin3.cpp plugin3.h
PLUGIN_PATH "${TEST_PLUGIN_PATH}"
+ SKIP_INSTALL
)
diff --git a/tests/auto/extensionsystem/pluginspec/testplugin/CMakeLists.txt b/tests/auto/extensionsystem/pluginspec/testplugin/CMakeLists.txt
index 2a01133532..df9fe19244 100644
--- a/tests/auto/extensionsystem/pluginspec/testplugin/CMakeLists.txt
+++ b/tests/auto/extensionsystem/pluginspec/testplugin/CMakeLists.txt
@@ -15,6 +15,7 @@ add_qtc_plugin(testplugin
PLUGIN_PATH "${CMAKE_CURRENT_BINARY_DIR}"
PROPERTIES
OUTPUT_NAME ${plugin_output_name}
+ SKIP_INSTALL
)
# The empty string gets removed if I put it above
diff --git a/tests/unit/echoserver/CMakeLists.txt b/tests/unit/echoserver/CMakeLists.txt
index 299b8a2b3a..ce3065be8b 100644
--- a/tests/unit/echoserver/CMakeLists.txt
+++ b/tests/unit/echoserver/CMakeLists.txt
@@ -4,4 +4,5 @@ add_qtc_executable(echo
SOURCES
echoclangcodemodelserver.cpp echoclangcodemodelserver.h
echoserverprocessmain.cpp
+ SKIP_INSTALL
)