mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 12:09:48 +00:00
Patched versions of CMake for ReactOS needs
ff6c401309
When using the boost MPL library, one can set a define to increase the limit of how many variadic elements should be supported. The default for BOOST_MPL_LIMIT_VECTOR_SIZE is 20: http://www.boost.org/doc/libs/1_36_0/libs/mpl/doc/refmanual/limit-vector-size.html If the foo library requires that to be set to 30, and the independent bar library requires it to be set to 40, consumers of both need to set it to 40. add_library(foo INTERFACE) set_property(TARGET foo PROPERTY INTERFACE_boost_mpl_vector_size 30) set_property(TARGET foo PROPERTY COMPATIBLE_INTERFACE_NUMBER_MAX boost_mpl_vector_size) target_compile_definitions(foo INTERFACE BOOST_MPL_LIMIT_VECTOR_SIZE=$<TARGET_PROPERTY:boost_mpl_vector_size>) add_library(bar INTERFACE) set_property(TARGET bar PROPERTY INTERFACE_boost_mpl_vector_size 40) # Technically the next two lines are redundant, but as foo and bar are # independent, they both set these interfaces. set_property(TARGET bar PROPERTY COMPATIBLE_INTERFACE_NUMBER_MAX boost_mpl_vector_size) target_compile_definitions(bar INTERFACE BOOST_MPL_LIMIT_VECTOR_SIZE=$<TARGET_PROPERTY:boost_mpl_vector_size>) add_executable(user) target_link_libraries(user foo bar) Because the TARGET_PROPERTY reads the boost_mpl_vector_size property from the HEAD of the dependency graph (the user target), and because that property appears in the COMPATIBLE_INTERFACE_NUMBER_MAX of the dependencies of the user target, the maximum value for it is chosen for the compile definition, ie, 40. There are also use-cases for choosing the minimum value of a number. In Qt, deprecated API can be disabled by version. Setting the definition QT_DISABLE_DEPRECATED_BEFORE=0 disables no deprecated API. Setting it to 0x501000 disables API which was deprecated before Qt 5.1 etc. If two dependencies require the use of API which was deprecated in different Qt versions, then COMPATIBLE_INTERFACE_NUMBER_MIN can be used to ensure that both can compile. |
||
---|---|---|
Auxiliary | ||
Example | ||
Help | ||
Modules | ||
Source | ||
Templates | ||
Tests | ||
Utilities | ||
.gitattributes | ||
.hooks-config.bash | ||
bootstrap | ||
ChangeLog.manual | ||
ChangeLog.txt | ||
cmake_uninstall.cmake.in | ||
CMakeCPack.cmake | ||
CMakeCPackOptions.cmake.in | ||
CMakeGraphVizOptions.cmake | ||
CMakeLists.txt | ||
CMakeLogo.gif | ||
CompileFlags.cmake | ||
configure | ||
Copyright.txt | ||
CTestConfig.cmake | ||
CTestCustom.cmake.in | ||
CTestCustom.ctest.in | ||
DartConfig.cmake | ||
DartLocal.conf.in | ||
doxygen.config | ||
Readme.txt |
This is CMake, the cross-platform, open-source make system. CMake is distributed under the BSD License, see Copyright.txt. For documentation see the Docs/ directory once you have built CMake or visit http://www.cmake.org. Building CMake ============== Supported Platforms ------------------- MS Windows, Mac OS X, Linux, FreeBSD, Solaris, HP-UX, IRIX, BeOS, QNX Other UNIX-like operating systems may work too out of the box, if not it shouldn't be a major problem to port CMake to this platform. Contact the CMake mailing list in this case: http://www.cmake.org/mailman/listinfo/cmake If you don't have any previous version of CMake already installed -------------------------------------------------------------- * UNIX/Mac OSX/MinGW/MSYS/Cygwin: You need to have a compiler and a make installed. Run the bootstrap script you find the in the source directory of CMake. You can use the --help option to see the supported options. You may want to use the --prefix=<install_prefix> option to specify a custom installation directory for CMake. You can run the bootstrap script from within the CMake source directory or any other build directory of your choice. Once this has finished successfully, run make and make install. So basically it's the same as you may be used to from autotools-based projects: $ ./bootstrap; make; make install * Other Windows: You need to download and install a binary release of CMake in order to build CMake. You can get these releases from http://www.cmake.org/HTML/Download.html . Then proceed with the instructions below. You already have a version of CMake installed --------------------------------------------- You can build CMake as any other project with a CMake-based build system: run the installed CMake on the sources of this CMake with your preferred options and generators. Then build it and install it. For instructions how to do this, see http://www.cmake.org/HTML/RunningCMake.html