Changes between Version 1 and Version 2 of CMakeBuildFeatures
- Timestamp:
- Jun 18, 2007, 11:35:19 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CMakeBuildFeatures
v1 v2 39 39 A string containing extra flags that will be added to the compile line, including macro definitions and compiler-specific flags needed to enable this particular feature. 40 40 41 feature_LINK_FLAGS: 41 feature_LINK_FLAGS:: 42 42 A string containing extra flags that will be added to the beginning of the link line. Note that these flags should '''not''' contain extra libraries that one needs to link against. Those should go into `feature_LINK_LIBS`. 43 43 44 feature_LINK_LIBS: 44 feature_LINK_LIBS:: 45 45 A CMake list containing the names of additional libraries that will be linked into libraries and executables that require this feature. The elements in this list should name the library (e.g., `pthread`) rather than providing the link command itself (e.g., `-lpthread`), so that linking will be more portable. 46 46 … … 50 50 51 51 == Default Variants == 52 By default, Boost's build system will build every permutation of libraries in the space (`STATIC` or `SHARED ) x (`DEBUG` or `RELEASE`) x (`SINGLE_THREADED` or `MULTI_THREADED`), resulting in 8 different copies of each library. On Windows, where the distinction between static and dynamic run-time libraries is very important, the default build also creates permutations with (`STATIC_RUNTIME` or `DYNAMIC_RUNTIME`). Certain non-sensical combinations of libraries will automatically be eliminated, e.g., it does not generally make sense to create a shared library that links against the static C and C++ run-time libraries. However, this still means that the default build creates between 8 and 12 different variants of each Boost library.52 By default, Boost's build system will build every permutation of libraries in the space (`STATIC` or `SHARED`) x (`DEBUG` or `RELEASE`) x (`SINGLE_THREADED` or `MULTI_THREADED`), resulting in 8 different copies of each library. On Windows, where the distinction between static and dynamic run-time libraries is very important, the default build also creates permutations with (`STATIC_RUNTIME` or `DYNAMIC_RUNTIME`). Certain non-sensical combinations of libraries will automatically be eliminated, e.g., it does not generally make sense to create a shared library that links against the static C and C++ run-time libraries. However, this still means that the default build creates between 8 and 12 different variants of each Boost library. 53 53 54 54 Users who only need a few variants of each library can change which variants of Boost libraries are build by default using various configuration options. For each feature, CMake's configuration will contain an option `BUILD_feature`. When the feature is ON, the build system will produce variants with that feature. When the feature is OFF, the build system will suppress variants with that feature. For example, toggling `BUILD_DEBUG` to `OFF` will inhibit the creation of the debug variants, drastically improving overall build times.