2020-05-27 05:15:46 +02:00
|
|
|
if (MSVC)
|
|
|
|
# Visual Studio only sets _DEBUG
|
2022-07-11 10:46:18 +02:00
|
|
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
2020-05-27 05:15:46 +02:00
|
|
|
add_definitions(-DDEBUG)
|
2015-02-13 19:00:14 +01:00
|
|
|
endif()
|
2020-05-27 05:15:46 +02:00
|
|
|
|
2022-04-21 21:28:29 +02:00
|
|
|
#add_definitions(-DCPPCHECKLIB_IMPORT)
|
|
|
|
#add_definitions(-DTINYXML2_IMPORT)
|
|
|
|
add_definitions(-DWIN32)
|
2020-05-27 05:15:46 +02:00
|
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
2022-04-21 21:28:29 +02:00
|
|
|
add_definitions(-DWIN32_LEAN_MEAN)
|
|
|
|
add_definitions(-D_WIN64)
|
2020-05-27 05:15:46 +02:00
|
|
|
endif()
|
|
|
|
|
2022-01-04 15:45:36 +01:00
|
|
|
# TODO: this should probably apply to the compiler and not the platform
|
2022-12-07 09:20:09 +01:00
|
|
|
if (CPPCHK_GLIBCXX_DEBUG AND UNIX AND CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
|
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
|
|
if (USE_LIBCXX)
|
2023-01-02 22:10:50 +01:00
|
|
|
add_definitions(-D_LIBCPP_ENABLE_ASSERTIONS=1)
|
|
|
|
# TODO: also add _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS?
|
2022-12-07 09:20:09 +01:00
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
# TODO: check if this can be enabled again for Clang - also done in Makefile
|
2020-05-27 05:15:46 +02:00
|
|
|
add_definitions(-D_GLIBCXX_DEBUG)
|
2022-12-07 09:20:09 +01:00
|
|
|
endif()
|
2015-02-13 19:00:14 +01:00
|
|
|
endif()
|
2020-05-27 05:15:46 +02:00
|
|
|
|
|
|
|
if (HAVE_RULES)
|
|
|
|
add_definitions(-DHAVE_RULES -DTIXML_USE_STL)
|
|
|
|
endif()
|
|
|
|
|
2022-03-20 10:13:32 +01:00
|
|
|
if (Boost_FOUND)
|
|
|
|
add_definitions(-DHAVE_BOOST)
|
|
|
|
endif()
|
|
|
|
|
2020-03-01 17:11:20 +01:00
|
|
|
if (ENABLE_CHECK_INTERNAL)
|
|
|
|
add_definitions(-DCHECK_INTERNAL)
|
|
|
|
endif()
|
2020-11-11 07:54:01 +01:00
|
|
|
|
2022-02-23 09:04:35 +01:00
|
|
|
if (USE_THREADS)
|
|
|
|
add_definitions(-DUSE_THREADS)
|
|
|
|
endif()
|
|
|
|
|
2022-04-15 18:49:24 +02:00
|
|
|
if (MSVC AND DISABLE_CRTDBG_MAP_ALLOC)
|
|
|
|
add_definitions(-DDISABLE_CRTDBG_MAP_ALLOC)
|
|
|
|
endif()
|
|
|
|
|
2022-08-20 20:54:31 +02:00
|
|
|
if (NO_UNIX_SIGNAL_HANDLING)
|
|
|
|
add_definitions(-DNO_UNIX_SIGNAL_HANDLING)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (NO_UNIX_BACKTRACE_SUPPORT)
|
|
|
|
add_definitions(-DNO_UNIX_BACKTRACE_SUPPORT)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (NO_WINDOWS_SEH)
|
|
|
|
add_definitions(-DNO_WINDOWS_SEH)
|
|
|
|
endif()
|
|
|
|
|
2020-12-25 19:57:12 +01:00
|
|
|
file(TO_CMAKE_PATH ${FILESDIR} _filesdir)
|
|
|
|
add_definitions(-DFILESDIR="${_filesdir}")
|