mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-22 20:21:13 +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.
104 lines
3.1 KiB
CMake
104 lines
3.1 KiB
CMake
cmake_minimum_required( VERSION 3.1.0 )
|
|
|
|
if( NOT CMAKE_CROSSCOMPILING )
|
|
|
|
include( CheckFunctionExists )
|
|
include( CheckTypeSize )
|
|
|
|
if( MSVC )
|
|
# Runtime type information is required and don't complain about uint32_t to bool conversions
|
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR /wd4800 /wd4244" )
|
|
endif()
|
|
|
|
set( PACKAGE_NAME re2c )
|
|
set( PACKAGE_TARNAME re2c )
|
|
set( PACKAGE_VERSION 0.16 )
|
|
set( PACKAGE_STRING "re2c 0.16" )
|
|
set( PACKAGE_BUGREPORT "re2c-general@lists.sourceforge.net" )
|
|
|
|
CHECK_FUNCTION_EXISTS( strdup HAVE_STRDUP )
|
|
CHECK_FUNCTION_EXISTS( strndup HAVE_STRNDUP )
|
|
|
|
CHECK_TYPE_SIZE( "0i8" SIZEOF_0I8 )
|
|
CHECK_TYPE_SIZE( "0l" SIZEOF_0L )
|
|
CHECK_TYPE_SIZE( "0ll" SIZEOF_0LL )
|
|
CHECK_TYPE_SIZE( char SIZEOF_CHAR )
|
|
CHECK_TYPE_SIZE( short SIZEOF_SHORT )
|
|
CHECK_TYPE_SIZE( int SIZEOF_INT )
|
|
CHECK_TYPE_SIZE( long SIZEOF_LONG )
|
|
CHECK_TYPE_SIZE( "long long" SIZEOF_LONG_LONG )
|
|
CHECK_TYPE_SIZE( "void *" SIZEOF_VOID_P )
|
|
CHECK_TYPE_SIZE( __int64 SIZEOF___INT_64 )
|
|
|
|
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h )
|
|
include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} )
|
|
add_definitions( -DHAVE_CONFIG_H )
|
|
|
|
file( GLOB SRC_HDR
|
|
src/codegen/*.h
|
|
src/conf/*.h
|
|
src/ir/*.h
|
|
src/*.h
|
|
src/parse/*.h
|
|
src/util/*.h )
|
|
|
|
add_executable( re2c
|
|
${SRC_HDR}
|
|
src/codegen/bitmap.cc
|
|
src/codegen/emit_action.cc
|
|
src/codegen/emit_dfa.cc
|
|
src/codegen/label.cc
|
|
src/codegen/go_construct.cc
|
|
src/codegen/go_destruct.cc
|
|
src/codegen/go_emit.cc
|
|
src/codegen/go_used_labels.cc
|
|
src/codegen/input_api.cc
|
|
src/codegen/output.cc
|
|
src/codegen/print.cc
|
|
src/conf/msg.cc
|
|
src/conf/opt.cc
|
|
src/conf/parse_opts.cc
|
|
src/conf/warn.cc
|
|
src/ir/nfa/calc_size.cc
|
|
src/ir/nfa/nfa.cc
|
|
src/ir/nfa/split.cc
|
|
src/ir/adfa/adfa.cc
|
|
src/ir/adfa/prepare.cc
|
|
src/ir/dfa/determinization.cc
|
|
src/ir/dfa/fillpoints.cc
|
|
src/ir/dfa/minimization.cc
|
|
src/ir/regexp/display.cc
|
|
src/ir/regexp/encoding/enc.cc
|
|
src/ir/regexp/encoding/range_suffix.cc
|
|
src/ir/regexp/encoding/utf8/utf8_regexp.cc
|
|
src/ir/regexp/encoding/utf8/utf8_range.cc
|
|
src/ir/regexp/encoding/utf8/utf8.cc
|
|
src/ir/regexp/encoding/utf16/utf16_regexp.cc
|
|
src/ir/regexp/encoding/utf16/utf16.cc
|
|
src/ir/regexp/encoding/utf16/utf16_range.cc
|
|
src/ir/regexp/fixed_length.cc
|
|
src/ir/regexp/regexp.cc
|
|
src/ir/compile.cc
|
|
src/ir/rule_rank.cc
|
|
src/ir/skeleton/control_flow.cc
|
|
src/ir/skeleton/generate_code.cc
|
|
src/ir/skeleton/generate_data.cc
|
|
src/ir/skeleton/match_empty.cc
|
|
src/ir/skeleton/maxlen.cc
|
|
src/ir/skeleton/skeleton.cc
|
|
src/ir/skeleton/unreachable.cc
|
|
src/ir/skeleton/way.cc
|
|
src/main.cc
|
|
src/parse/code.cc
|
|
src/parse/input.cc
|
|
src/parse/lex.cc
|
|
src/parse/lex_conf.cc
|
|
src/parse/parser.cc
|
|
src/parse/scanner.cc
|
|
src/parse/unescape.cc
|
|
src/util/s_to_n32_unsafe.cc
|
|
src/util/range.cc )
|
|
|
|
set( CROSS_EXPORTS ${CROSS_EXPORTS} re2c PARENT_SCOPE )
|
|
|
|
endif()
|