| 1 |
|
| 2 |
CMAKE |
| 3 |
----- |
| 4 |
|
| 5 |
Unix and Win32 binaries (both 32- and 64-bit) can be built using CMake. |
| 6 |
CMake is an open-source tool like automake - it generates makefiles. |
| 7 |
|
| 8 |
CMake v3.14.5 is able to generate: |
| 9 |
Borland Makefiles |
| 10 |
MSYS Makefiles |
| 11 |
MinGW Makefiles |
| 12 |
NMake Makefiles |
| 13 |
Unix Makefiles |
| 14 |
Visual Studio 16 2019 |
| 15 |
Visual Studio 15 2017 |
| 16 |
Visual Studio 14 2015 |
| 17 |
Visual Studio 12 2013 |
| 18 |
Visual Studio 11 2012 |
| 19 |
Visual Studio 10 2010 |
| 20 |
Visual Studio 9 2008 |
| 21 |
Watcom WMake |
| 22 |
|
| 23 |
|
| 24 |
BUILD PROCESS |
| 25 |
------------- |
| 26 |
|
| 27 |
. install cmake (cmake.org) |
| 28 |
. add directory containing cmake.exe to %PATH% |
| 29 |
. run cmake from the gc root directory, passing the target with -G: |
| 30 |
e.g., |
| 31 |
> cmake -G "Visual Studio 9 2008" . |
| 32 |
use the gc.sln file generated by cmake to build gc |
| 33 |
. specify -Denable_cplusplus=ON option to build gccpp, gctba (GC C++ support) |
| 34 |
. specify -Dbuild_tests=ON option to the tests (and run them by "ctest -V") |
| 35 |
. you can also run cmake from a build directory to build outside of |
| 36 |
the source tree. Just specify the path to the source tree: |
| 37 |
e.g., |
| 38 |
> mkdir out |
| 39 |
> cd out |
| 40 |
> cmake -G "Visual Studio 9 2008" .. |
| 41 |
> cmake --build . --config Release |
| 42 |
> ctest --build-config Release -V |
| 43 |
|
| 44 |
|
| 45 |
INPUT |
| 46 |
----- |
| 47 |
|
| 48 |
The main input to cmake is CMakeLists.txt file in the GC root directory. For |
| 49 |
help, go to cmake.org. |
| 50 |
|
| 51 |
|
| 52 |
HOW TO IMPORT BDWGC |
| 53 |
------------------- |
| 54 |
|
| 55 |
Another project could add bdwgc as one of its dependencies with something like |
| 56 |
this in their CMakeLists.txt: |
| 57 |
|
| 58 |
find_package(BDWgc 8.2.8 REQUIRED) |
| 59 |
add_executable(Foo foo.c) |
| 60 |
target_link_libraries(Foo BDWgc::gc) |
| 61 |
|
| 62 |
Other exported libraries are: cord, gccpp, gctba. |