]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: quote variable to allow empty values 55267/head
authorAthos Ribeiro <athos.ribeiro@canonical.com>
Mon, 22 Jan 2024 18:06:01 +0000 (15:06 -0300)
committerAthos Ribeiro <athos.ribeiro@canonical.com>
Mon, 22 Jan 2024 18:06:01 +0000 (15:06 -0300)
Use quotes to allow empty submodules variable during the cmake build
configuration. This is specially useful for lean build environments
where git is not available (which would result in an empty submodules
variable).

Further context is available at
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056793#10.

Signed-off-by: Athos Ribeiro <athos.ribeiro@canonical.com>
cmake/modules/CTags.cmake

index c3e1b3799b02451e07ac8198c56808d442bb2814..ee1912f3c5a75cf286d6dc6aabf81a246b6f6f1a 100644 (file)
@@ -16,10 +16,10 @@ function(add_tags name)
       OUTPUT_VARIABLE submodules
       OUTPUT_STRIP_TRAILING_WHITESPACE)
     if(${result_code} EQUAL 0)
-      string(REPLACE "${TAGS_SRC_DIR}/" "" submodules ${submodules})
+      string(REPLACE "${TAGS_SRC_DIR}/" "" submodules "${submodules}")
       # cmake list uses ";" as the delimiter, so split the string manually
       # before iterating in it.
-      string(REPLACE "\n" ";" submodules ${submodules})
+      string(REPLACE "\n" ";" submodules "${submodules}")
       list(APPEND excludes ${submodules})
     endif()
   endif()