]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: s/NPM/NPM_EXECUTABLE/ 42255/head
authorKefu Chai <kchai@redhat.com>
Wed, 21 Jul 2021 02:46:51 +0000 (10:46 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 22 Jul 2021 08:35:57 +0000 (16:35 +0800)
so the naming is more consistent with other executables found by
find_program().

Signed-off-by: Kefu Chai <kchai@redhat.com>
CMakeLists.txt
src/pybind/mgr/dashboard/frontend/CMakeLists.txt

index fb269c0e3e8f1067373a561e42f8c6f54b190777..65f7877776446ce933b2e9b52489e921fcb20b2d 100644 (file)
@@ -630,8 +630,8 @@ include_directories(BEFORE SYSTEM ${Boost_INCLUDE_DIRS})
 option(WITH_MGR_DASHBOARD_FRONTEND "Build the mgr/dashboard frontend using `npm`" ON)
 option(WITH_SYSTEM_NPM "Assume that dashboard build tools already installed through packages" OFF)
 if(WITH_SYSTEM_NPM)
-  find_program(NPM npm)
-  if(NOT NPM)
+  find_program(NPM_EXECUTABLE npm)
+  if(NOT NPM_EXECUTABLE)
     message(FATAL_ERROR "Can't find npm.")
   endif()
 endif()
index 9928c0e71983166ba4855d5754b61d32cf4654ee..bce59d07dd89b264aac3ce703720be2bfa4c15f3 100644 (file)
@@ -13,7 +13,7 @@ function(add_npm_command)
   else()
     string(REGEX REPLACE
       "^([^ ]=[^ ] )*npm (.*)$"
-      "\\1${NPM} \\2"
+      "\\1${NPM_EXECUTABLE} \\2"
       command ${command})
   endif()
   string(REPLACE " " ";" command "${command}")