nap icon indicating copy to clipboard operation
nap copied to clipboard

string sub-command REPLACE requires at least four arguments

Open sphaero opened this issue 1 year ago • 1 comments
trafficstars

CMake Error at cmake/nap_module.cmake:120 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  system_modules/napsequenceaudiogui/CMakeLists.txt:23 (include)

with cmake 3.29

Fix

diff --git a/cmake/nap_module.cmake b/cmake/nap_module.cmake
index 981f14245..92e54fe90 100644
--- a/cmake/nap_module.cmake
+++ b/cmake/nap_module.cmake
@@ -117,7 +117,7 @@ if(APPLE)
 elseif(UNIX)
     set(LINUX_EXTRA_RPATH "")
     foreach(rpath ${DEEP_DEPENDENT_RPATHS})
-        string(REPLACE "{BUILD_TYPE}" ${CMAKE_BUILD_TYPE} rpath "${rpath}")
+        string(REPLACE "{BUILD_TYPE}" "${CMAKE_BUILD_TYPE}" rpath "${rpath}")
         list(APPEND LINUX_EXTRA_RPATH ${rpath})
     endforeach()
 endif()

sphaero avatar May 15 '24 11:05 sphaero

Could you submit this as a PR instead of logging it as a bug? NAP ships with it's own version of CMAKE (cmake version 3.21.3) in thirdparty and that's the one we support. Your change is compiled and validated, ensuring the change doesn't break existing builds.

cklosters avatar May 22 '24 09:05 cklosters

Not an issue with current supported cmake

cklosters avatar Aug 10 '24 21:08 cklosters