Skip to content

Commit 63608a3

Browse files
committed
Scope KOMPUTE_BUILD_PYTHON to the Python module and add missing fmt include in Tensor.cpp
Signed-off-by: UENO, M. <eunosium-1128@live.jp>
1 parent 7f81331 commit 63608a3

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,6 @@ if(KOMPUTE_OPT_ANDROID_BUILD)
243243
add_compile_definitions(VK_USE_PLATFORM_ANDROID_KHR=1)
244244
endif()
245245

246-
if(KOMPUTE_OPT_BUILD_PYTHON)
247-
add_compile_definitions(KOMPUTE_BUILD_PYTHON=1)
248-
endif()
249-
250246
if(KOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS)
251247
add_compile_definitions(KOMPUTE_DISABLE_VK_DEBUG_LAYERS=1)
252248
endif()

python/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ include_directories(
77
target_link_libraries(
88
kp PRIVATE
99
kompute::kompute)
10+
11+
# Only the Python module needs KOMPUTE_BUILD_PYTHON
12+
target_compile_definitions(kp PRIVATE KOMPUTE_BUILD_PYTHON=1)

src/Tensor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// SPDX-License-Identifier: Apache-2.0
22

3+
#include <fmt/format.h>
34
#include "kompute/Tensor.hpp"
45
#include "kompute/Image.hpp"
56

0 commit comments

Comments
 (0)