2020-05-27 05:15:46 +02:00
|
|
|
if (MSVC)
|
|
|
|
# Visual Studio only sets _DEBUG
|
2020-04-22 11:04:19 +02:00
|
|
|
if (CMAKE_BUILD_TYPE MATCHES "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
|
|
|
|
|
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
|
|
|
endif()
|
|
|
|
|
2022-01-04 15:45:36 +01:00
|
|
|
# TODO: this should probably apply to the compiler and not the platform
|
|
|
|
if (CPPCHK_GLIBCXX_DEBUG AND UNIX)
|
2020-05-27 05:15:46 +02:00
|
|
|
# TODO: check if this can be enabled again for Clang - also done in Makefile
|
|
|
|
if (CMAKE_BUILD_TYPE MATCHES "Debug" AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
|
|
|
add_definitions(-D_GLIBCXX_DEBUG)
|
2020-11-11 07:54:01 +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()
|
|
|
|
|
2020-12-25 19:57:12 +01:00
|
|
|
file(TO_CMAKE_PATH ${FILESDIR} _filesdir)
|
|
|
|
add_definitions(-DFILESDIR="${_filesdir}")
|