Skip to content

Commit 8f454a9

Browse files
committed
update bzip2 submodule to latest *official* revision, adjust build system + apply workaround for CLang(CL) 19.1.1 due to error : use of undeclared label "errhandler"; for some reason if in single translation unit we have identical label names (goto) in separate function bodies we hit this error
1 parent 16088b9 commit 8f454a9

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

3rdparty/CMakeLists.txt

+11-12
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,16 @@ if(_NBL_COMPILE_WITH_GLI_)
247247
set(BUILD_TESTING ${_OLD_BUILD_TESTING})
248248
endif()
249249

250+
set(ENABLE_STATIC_LIB ON)
251+
set(ENABLE_SHARED_LIB OFF)
252+
set(ENABLE_EXAMPLES OFF)
253+
set(ENABLE_DOCS OFF)
254+
set(ENABLE_APP OFF)
255+
set(ENABLE_LIB_ONLY ON)
256+
set(ENABLE_TESTS OFF)
257+
set(ENABLE_SUMMARY OFF)
258+
add_subdirectory(bzip2 bzip2 EXCLUDE_FROM_ALL)
259+
250260
add_library(lzma OBJECT
251261
lzma/C/Alloc.c
252262
lzma/C/LzFind.c
@@ -263,17 +273,6 @@ add_library(lz4 OBJECT
263273
lz4/lib/xxhash.c
264274
)
265275

266-
267-
add_library(bzip2 OBJECT
268-
bzip2/blocksort.c
269-
bzip2/bzlib.c
270-
bzip2/compress.c
271-
bzip2/crctable.c
272-
bzip2/decompress.c
273-
bzip2/huffman.c
274-
bzip2/randtable.c
275-
)
276-
277276
add_library(spirv_cross OBJECT
278277
nbl_spirv_cross/spirv_cfg.cpp
279278
nbl_spirv_cross/spirv_cross.cpp
@@ -460,7 +459,7 @@ set(NBL_3RDPARTY_TARGETS
460459
shaderc_util
461460
shaderc
462461
jpeg-static
463-
bzip2
462+
bz2_static
464463
simdjson
465464
nlohmann_json
466465
glslang

3rdparty/bzip2

Submodule bzip2 updated 94 files

src/nbl/CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ set(NBL_LIBRARY_CREATION_SOURCES
324324
${NABLA_SRCS_COMMON}
325325
${NABLA_HEADERS}
326326
$<TARGET_OBJECTS:aesGladman>
327-
$<TARGET_OBJECTS:bzip2>
328327
$<TARGET_OBJECTS:lz4>
329328
$<TARGET_OBJECTS:lzma>
330329
$<TARGET_OBJECTS:spirv_cross>
@@ -391,6 +390,13 @@ if(_NBL_BUILD_DPL_)
391390
target_link_libraries(Nabla INTERFACE tbb tbbmalloc tbbmalloc_proxy)
392391
endif()
393392

393+
# bzip2
394+
if(NBL_STATIC_BUILD)
395+
target_link_libraries(Nabla INTERFACE bz2_static)
396+
else()
397+
target_link_libraries(Nabla PRIVATE bz2_static)
398+
endif()
399+
394400
# boost
395401
target_include_directories(Nabla PUBLIC "${BOOST_PREPROCESSOR_INCLUDE}")
396402

0 commit comments

Comments
 (0)