]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: use build.py in cmake configuration
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 16 Jun 2022 19:41:04 +0000 (15:41 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 13 Sep 2022 16:17:20 +0000 (12:17 -0400)
This change replaces the call to build.sh with a call to build.py.

It also makes the build.py script a dependency to the cmake custom to
ensure we rebuild the cephadm binary if build.py changes.  Since, if one
changes the build script used to make the binary we should rebuild the
output as the new script may indeed change the intended output.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/CMakeLists.txt

index 464372debaa4d3bcbb8e8baf1e1e39bce0397f1c..fdb7c9881fa1dcf27df93172b228d95fb33f06d9 100644 (file)
@@ -7,9 +7,11 @@ set(bin_target_file ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/cephadm)
 
 add_custom_command(
   OUTPUT "${bin_target_file}"
-  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cephadm.py
+  DEPENDS
+    ${CMAKE_CURRENT_SOURCE_DIR}/cephadm.py
+    ${CMAKE_CURRENT_SOURCE_DIR}/build.py
   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-  COMMAND bash build.sh ${bin_target_file}
+  COMMAND ${Python3_EXECUTABLE} build.py ${bin_target_file}
 )
 
 add_custom_target(cephadm ALL