cmake: Don't use string PREPEND
authorAndreas Schneider <asn@samba.org>
Wed, 24 Oct 2018 06:44:19 +0000 (08:44 +0200)
committerAndreas Schneider <asn@samba.org>
Tue, 30 Oct 2018 09:50:49 +0000 (10:50 +0100)
This is only supported in cmake >= 3.10.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
tests/CMakeLists.txt

index 3578f7614942a1783ea2a1ee3a958d201aa52b33..b43d03c2203f779b036fac3f1de90faa781734eb 100644 (file)
@@ -83,8 +83,8 @@ function(ADD_CMOCKA_TEST_ENVIRONMENT _TEST_NAME)
     if (OSX)
         set(TORTURE_ENVIRONMENT "DYLD_FORCE_FLAT_NAMESPACE=1;DYLD_INSERT_LIBRARIES=${SOCKET_WRAPPER_LOCATION}")
     else ()
-        string(REPLACE ";" ":" TORTURE_ENVIRONMENT "${PRELOAD_LIBRARIES}")
-        string(PREPEND TORTURE_ENVIRONMENT "LD_PRELOAD=")
+        string(REPLACE ";" ":" _TMP_ENV "${PRELOAD_LIBRARIES}")
+        set(TORTURE_ENVIRONMENT "LD_PRELOAD=${_TMP_ENV}")
     endif()
 
     set_property(TEST