]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: dashboard: move "if(WITH_MGR_DASHBOARD_FRONTEND)" up 30958/head
authorKefu Chai <kchai@redhat.com>
Wed, 16 Oct 2019 08:50:47 +0000 (16:50 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 16 Oct 2019 08:50:49 +0000 (16:50 +0800)
two reasons:

* we don't need to run the tox test if WITH_MGR_DASHBOARD_FRONTEND is
  OFF
* better readability

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

index 2b5f4a7d4ad73dfcfac618d2c033e7592bd8c9ff..ef07dac77c39965bda1090176a5ba126f652c0c5 100644 (file)
@@ -1,4 +1,6 @@
-add_subdirectory(dashboard)
+if(WITH_MGR_DASHBOARD_FRONTEND)
+  add_subdirectory(dashboard)
+endif()
 add_subdirectory(insights)
 add_subdirectory(ansible)
 add_subdirectory(orchestrator_cli)
index 472aed95593f7ae8464ac8028a28d7cf4c601e34..9988b8ea71cda8b5afbd2621e218408f3c2bed2d 100644 (file)
@@ -17,8 +17,6 @@ function(add_npm_command)
     COMMENT ${NC_COMMENT})
 endfunction(add_npm_command)
 
-if(WITH_MGR_DASHBOARD_FRONTEND)
-
 if(WITH_SYSTEM_NPM)
   set(mgr-dashboard-nodeenv-dir )
   set(nodeenv "")
@@ -121,7 +119,6 @@ add_custom_target(mgr-dashboard-frontend-build
   WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend)
 
 add_dependencies(tests mgr-dashboard-frontend-build)
-endif(WITH_MGR_DASHBOARD_FRONTEND)
 
 if(WITH_TESTS)
   include(AddCephTest)