[extra-cmake-modules] modules: Disable alteration of QT_PLUGIN_PATH by ECM when running tests.

Ben Cooksley null at kde.org
Fri Aug 31 09:47:06 BST 2018


Git commit 7d6d5b1e705f54a216f8d5235b66bbf2035d7448 by Ben Cooksley.
Committed on 31/08/2018 at 08:46.
Pushed by bcooksley into branch 'master'.

Disable alteration of QT_PLUGIN_PATH by ECM when running tests.

On Windows at least this is simply broken and leads to tests failing because plugins from other modules cannot be found at all.
Based on this it is likely that it is broken on other platforms as well, it's just being hidden there by other logic.

CCMAIL: kde-frameworks-devel at kde.org

M  +9    -9    modules/ECMAddTests.cmake

https://commits.kde.org/extra-cmake-modules/7d6d5b1e705f54a216f8d5235b66bbf2035d7448

diff --git a/modules/ECMAddTests.cmake b/modules/ECMAddTests.cmake
index 571874d..da6217d 100644
--- a/modules/ECMAddTests.cmake
+++ b/modules/ECMAddTests.cmake
@@ -114,15 +114,15 @@ function(ecm_add_test)
   add_test(NAME ${_testname} COMMAND ${_targetname})
   target_link_libraries(${_targetname} ${ARG_LINK_LIBRARIES})
   ecm_mark_as_test(${_targetname})
-  if (CMAKE_LIBRARY_OUTPUT_DIRECTORY)
-    if(CMAKE_HOST_SYSTEM MATCHES "Windows")
-      set(PATHSEP "\\;")
-    else() # e.g. Linux
-      set(PATHSEP ":")
-    endif()
-    set(_plugin_path $ENV{QT_PLUGIN_PATH})
-    set_property(TEST ${_testname} PROPERTY ENVIRONMENT QT_PLUGIN_PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}${PATHSEP}${_plugin_path})
-  endif()
+  #if (CMAKE_LIBRARY_OUTPUT_DIRECTORY)
+  #  if(CMAKE_HOST_SYSTEM MATCHES "Windows")
+  #    set(PATHSEP "\\;")
+  #  else() # e.g. Linux
+  #    set(PATHSEP ":")
+  #  endif()
+  #  set(_plugin_path $ENV{QT_PLUGIN_PATH})
+  #  set_property(TEST ${_testname} PROPERTY ENVIRONMENT QT_PLUGIN_PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}${PATHSEP}${_plugin_path})
+  #endif()
   if (ARG_TARGET_NAME_VAR)
     set(${ARG_TARGET_NAME_VAR} "${_targetname}" PARENT_SCOPE)
   endif()


More information about the Kde-frameworks-devel mailing list