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