File tree 2 files changed +10
-10
lines changed
2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 45
45
submodules : true
46
46
47
47
48
+ env :
49
+ CIBW_ENVIRONMENT : SLIMGUI_DISABLE_LEAK_CHECKS=1
48
50
49
51
# - name: Verify clean directory
50
52
# run: git diff --exit-code
Original file line number Diff line number Diff line change @@ -10,8 +10,15 @@ find_package(Python 3.8
10
10
# Import nanobind through CMake's find_package mechanism
11
11
find_package (nanobind CONFIG REQUIRED)
12
12
13
+ # Disable leak checks if requested (usually by cibuildwheel in CI)
14
+ if (DEFINED ENV{SLIMGUI_DISABLE_LEAK_CHECKS})
15
+ set (DISABLE_LEAK_CHECKS 1)
16
+ else ()
17
+ set (DISABLE_LEAK_CHECKS 0)
18
+ endif ()
19
+
13
20
#add_definitions(-DIMGUI_DISABLE_OBSOLETE_FUNCTIONS=1)
14
- add_definitions (-DIMGUI_DISABLE_OBSOLETE_KEYIO=1)
21
+ add_definitions (-DIMGUI_DISABLE_OBSOLETE_KEYIO=1 -DSLIMGUI_DISABLE_LEAK_CHECKS= ${DISABLE_LEAK_CHECKS} )
15
22
16
23
nanobind_add_module(slimgui_ext
17
24
NB_STATIC
@@ -34,15 +41,6 @@ nanobind_add_stub(
34
41
DEPENDS slimgui_ext
35
42
)
36
43
37
- # Check for an environment variable
38
- if (DEFINED ENV{CIBW_BUILD})
39
- set (DISABLE_LEAK_CHECKS 1)
40
- else ()
41
- set (DISABLE_LEAK_CHECKS 0)
42
- endif ()
43
-
44
- target_compile_definitions (slimgui_ext PRIVATE SLIMGUI_DISABLE_LEAK_CHECKS=${DISABLE_LEAK_CHECKS} )
45
-
46
44
include_directories (${CMAKE_SOURCE_DIR} /src/c/imgui)
47
45
48
46
install (TARGETS slimgui_ext LIBRARY DESTINATION slimgui)
You can’t perform that action at this time.
0 commit comments