Provides some useful extensions to the normal functionality of CMake
When using the mz tools more libraries can be searched for, see the Modules directory for details.
Additional commands, some are nothing more than cosmetic...
add the definition (and following) to the list of definitions passed to the compiler. Automatically switches between the syntax of msvc and gcc/clang Example: mz_add_definition(NO_DEBUG)
pass the given flag to the C++ compiler when the compiler matches the given platform
pass the given flag to the C compiler when the compiler matches the given platform
pass the given flag to the compiler, no matter wether compiling C or C++ files. The selected platform is still respected
resets all configured compiler flags back to the cmake default. This is especially useful when adding external libraries which might still have compiler warnings
MZ_IS_VS true when the platform is MS Visual Studio
MZ_IS_GCC true when the compiler is gcc or compatible
MZ_IS_CLANG true when the compiler is clang
MZ_IS_XCODE true when configuring for the XCode IDE
MZ_IS_RELEASE true when building with CMAKE_BUILD_TYPE = "Release"
MZ_64BIT true when building for a 64bit system
MZ_32BIT true when building for a 32bit system
MZ_HAS_CXX0X see MZ_HAS_CXX11
MZ_HAS_CXX11 true when the compiler supports at least a (subset) of the upcoming C++11 standard
MZ_MACOS true when building on macOS
MZ_IOS true when building for iOS
MZ_WINDOWS true when building on Windows
MZ_LINUX true when building on Linux
MZ_DATE_STRING a string containing day, date and time of the moment cmake was executed e.g. Mo, 27 Feb 2012 19:47:23 +0100
On all compilers supporting it, the option to treat warnings will be set. Additionally the warn level of the compiler will be decreased. See mz_use_default_compiler_settings whenever some warnings have to be accepted
MZ_WINDOWS on Windows
MZ_LINUX on Linux
MZ_MACOS on macOS
MZ_IOS on iOS
WIN32_VS on MSVC - note this is deprecated, it is recommended to use _MSC_VER
WIN32_MINGW when using the mingw toolchain
WIN32_MINGW64 when using the mingw-w64 toolchain
MZ_HAS_CXX11 / MZ_HAS_CXX0X when subset of C++11 is available
Simply copy all files including the Module directory into your project and include it within your CMakelists.txt by typing
include(< your folder >/global.cmake)
All settings will be done automatically and the given functions can be directly used