mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
19363ac23e
Since everything uses the same warning number, the old setup resulted in [[deprecated]] being silenced. So this explicitly adds the needed #defines to silence the very noisy warning from the MSVC headers but leaves warning 4996 active otherwise. In particlular this does: * silence all warnings in the subprojects * do not derive TIterator from std::iterator anymore as C++17 deprecates this. * silence the above for RapidJSON because altering that code is not desirable. * explicitly disable warning 4996 in some Windows files that call the deprecated (but still needed) GetVersionEx function. * define _CRT_SECURE_NO_DEPRECATE, _CRT_SECURE_NO_WARNINGS and _CRT_NONSTDC_NO_WARNINGS through CMake to disable the CRT's deprecation and security warnings. Currently this will print several (intended) deprecation warnings about 'updatesector' that point to code that needs to be changed but cannot yet without other refactorings being done first.
18 lines
323 B
CMake
18 lines
323 B
CMake
cmake_minimum_required( VERSION 3.1.0 )
|
|
|
|
make_release_only()
|
|
|
|
if (MSVC)
|
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244" )
|
|
endif()
|
|
|
|
add_definitions( -DBZ_NO_STDIO )
|
|
add_library( bz2 STATIC
|
|
blocksort.c
|
|
bzlib.c
|
|
compress.c
|
|
crctable.c
|
|
decompress.c
|
|
huffman.c
|
|
randtable.c )
|
|
target_link_libraries( bz2 )
|