Skip to content

Commit e9fdf33

Browse files
Merge pull request #1476 from blenderfreaky/ninja-jemalloc-build
Workaround build failure when building for jemalloc with ninja (#1474)
2 parents 9408362 + 9295c45 commit e9fdf33

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,14 @@ else()
214214
DEPENDS ${jemalloc_targ_SOURCE_DIR}/configure)
215215

216216
if(NOT UMF_QEMU_BUILD)
217-
set(MAKE_ARGUMENTS "-j$(nproc)")
217+
if(CMAKE_GENERATOR STREQUAL "Ninja")
218+
# While CMake is supposed to escape this in the generated build
219+
# files, for some reason, it doesn't do so here. Until it's fixed,
220+
# we just manually escape it for ninja.
221+
set(MAKE_ARGUMENTS "-j$$(nproc)")
222+
else()
223+
set(MAKE_ARGUMENTS "-j$(nproc)")
224+
endif()
218225
endif()
219226

220227
add_custom_command(

0 commit comments

Comments
 (0)