Browse Source

Tests: Fix RunCMake.install LDFLAGS treatment

In commit d806bd2e8c (Tests: Update test suite to run in an Anaconda
environment, 2020-03-30) an extra `}` was left in the value of the
modified `LDFLAGS`.  Remove it.  While at it, simplify the code.
Brad King 5 years ago
parent
commit
1c97a3c442
1 changed files with 1 additions and 2 deletions
  1. 1 2
      Tests/RunCMake/install/RunCMakeTest.cmake

+ 1 - 2
Tests/RunCMake/install/RunCMakeTest.cmake

@@ -176,8 +176,7 @@ elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
 elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
   if(DEFINED ENV{LDFLAGS})
     # Some setups prebake disable-new-dtags into LDFLAGS
-    set(new_ldflags $ENV{LDFLAGS}})
-    string(REPLACE "-Wl,--disable-new-dtags" "" new_ldflags "${new_ldflags}")
+    string(REPLACE "-Wl,--disable-new-dtags" "" new_ldflags "$ENV{LDFLAGS}")
     set(ENV{LDFLAGS} "${new_ldflags}")
   endif()