svn commit: r1920906 - /subversion/trunk/build/generator/templates/targets.cmake.ezt

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <[email protected]>
Author: rinrab
Date: Wed Sep 25 12:34:41 2024
New Revision: 1920906

URL: http://svn.apache.org/viewvc?rev=1920906&view=rev
Log:
cmake: Fix C-Tests failing in multi-config generators.

* build/generator/templates/targets.cmake.ezt
  (tests): Use `$<TARGET_FILE_DIR:...>` generator expression instead of using
   `CMAKE_CURRENT_BINARY_DIR` variable for determining the path to a directory
   with built Subversion binaries

Modified:
    subversion/trunk/build/generator/templates/targets.cmake.ezt

Modified: subversion/trunk/build/generator/templates/targets.cmake.ezt
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/templates/targets.cmake.ezt?rev=1920906&r1=1920905&r2=1920906&view=diff
==============================================================================
--- subversion/trunk/build/generator/templates/targets.cmake.ezt (original)
+++ subversion/trunk/build/generator/templates/targets.cmake.ezt Wed Sep 25 12:34:41 2024
@@ -62,7 +62,11 @@ if ([targets.enable_condition])[is targe
   add_executable([targets.name][for targets.sources]
     [targets.sources][end]
   )
-  add_test([targets.namespace].[targets.name] [targets.name] --srcdir ${CMAKE_SOURCE_DIR}/[targets.srcdir])
+  add_test(
+    NAME [targets.namespace].[targets.name]
+    COMMAND [targets.name] --srcdir ${CMAKE_SOURCE_DIR}/[targets.srcdir]
+    WORKING_DIRECTORY $<TARGET_FILE_DIR:[targets.name]>
+  )
   [end]target_link_libraries([targets.name] PRIVATE[for targets.libs]
     [targets.libs][end]
   )[if-any targets.msvc_libs]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.