From 63608a31398f8043d84b23d845aa73908eb4b213 Mon Sep 17 00:00:00 2001 From: "UENO, M." Date: Fri, 1 May 2026 14:05:50 +0000 Subject: [PATCH] Scope KOMPUTE_BUILD_PYTHON to the Python module and add missing fmt include in Tensor.cpp Signed-off-by: UENO, M. --- CMakeLists.txt | 4 ---- python/CMakeLists.txt | 3 +++ src/Tensor.cpp | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd72356f..4855f5a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,10 +243,6 @@ if(KOMPUTE_OPT_ANDROID_BUILD) add_compile_definitions(VK_USE_PLATFORM_ANDROID_KHR=1) endif() -if(KOMPUTE_OPT_BUILD_PYTHON) - add_compile_definitions(KOMPUTE_BUILD_PYTHON=1) -endif() - if(KOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS) add_compile_definitions(KOMPUTE_DISABLE_VK_DEBUG_LAYERS=1) endif() diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 1b4598fb..ea02fdb2 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -7,3 +7,6 @@ include_directories( target_link_libraries( kp PRIVATE kompute::kompute) + +# Only the Python module needs KOMPUTE_BUILD_PYTHON +target_compile_definitions(kp PRIVATE KOMPUTE_BUILD_PYTHON=1) diff --git a/src/Tensor.cpp b/src/Tensor.cpp index a1eaccf2..8d78d143 100644 --- a/src/Tensor.cpp +++ b/src/Tensor.cpp @@ -1,5 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 +#include #include "kompute/Tensor.hpp" #include "kompute/Image.hpp"