-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
99 lines (82 loc) · 4.12 KB
/
README
File metadata and controls
99 lines (82 loc) · 4.12 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
jmake quick documentation
==========================
Overview
--------
jmake is a simple java application that generates build scripts based
on CMake compatible CMakeLists.txt files.
It only supports a strict subset of CMake 3.X commands, just enough
to generate proper build scripts, and only supports in source compilation.
Other commands are simply ignored.
It either should be run in the location where the CMakeLists.txt is
located and it will be automatically be processed or a complete path
specification of the filename to parse should be passed as argument to
the application.
Supported build scripts
-----------------------
The current version supports the following build script generation:
Makefile generation
~~~~~~~~~~~~~~~~~~~~
The tool generates mostly POSIX compliant Makefiles, which are compatible
with POSIX C compiler interfaces.
One Makefile will be generated by target, with additional targets using
the output name MakefileN where N is a digit starting from 1.
All user defined macros using set are all expanded when generating the
build scripts.
Some variables are defined that can be configured by specifying macros when
calling make:
INSTALL_PREFIX:: Installation prefix where install should place its targets.
STATIC_LIBRARY_PREFIX:: Usual prefix of static libraries
(lib on POSIX platforms).
STATIC_LIBRARY_SUFFIX:: Usual suffix of static libraries
(.a on POSIX platforms)
STATIC_LIBRARY_FLAGS:: Linker flags to add when generating static libraries.
EXECUTABLE_SUFFIX:: Suffix for executable files (such as .exe on Windows
platforms)
SHARED_LIBRARY_PREFIX:: Usual prefix of shared libraries.
SHARED_LIBRARY_SUFFIX:: Usual suffix of shared libraries.
SHARED_LIBRARY_FLAGS:: Linker flags to add when generating shared libraries.
OBJECT_SUFFIX:: Compilation unit resulting file suffix (Usually .o on
POSIX platforms)
COMPILE_OPTIONS:: Compile options
COMPILE_DEFINITIONS:: Compile definitions
Supported CMake commands
------------------------
The following CMake commands are currently supported, with most
parameters except mandatory ones simply being ignored:
add_compile_options(<option> ...):: Add compile options to all targets in
this CMakeLists.txt
add_executable(<name> source1 [source2 ...]):: Add executable generation
target from source files.
add_library(<name> source1 [source2 ...]):: Add static library generation
target from source files.
include_directories(dir1 [dir2 ...]):: Add directories to include
compilation search path to all targets in this CMakeLists.txt
install:: Install targets, files or directories to specified destination.
link_directories(directory1 [directory2 ...]):: Add directories to linker
library search path to all targets in this CMakeLists.txt
link_libraries(library1 [library2 ...]):: Add libraries for linker to
link with to all executable targets in this CMakeLists.txt
set(<variable> <value>):: Sets a variable/macro
target_compile_definitions(<target> item1 [item2 ...]):: Add compile
definitions to a specific target.
target_compile_options(<target> item1 [item2 ...]):: Add compile options
to a specific target.
target_include_directories(<target> directory1 [directory2 ...]):: Add
directories to include compilation search path for a specific target.
target_link_libraries(<target> item1 [item2 ...]):: Add libraries for
linker to link with for specific executable target.
project(<project-name> [VERSION <major>[.<minor>[.<patch>[.<tweak>]]]]
[LANGUAGES <language-name>...])::
Set a name and version of the entire project.
Supported CMake variables
-------------------------
CMAKE_CURRENT_SOURCE_DIR:: Replaced by ".".
CMAKE_CURRENT_BINARY_DIR:: Replaced by ".".
CMAKE_SOURCE_DIR:: Replaced by "."
CMAKE_BINARY_DIR:: Replaced by "."
PROJECT_NAME : Replaced by the project name as defined in the project() command
PROJECT_VERSION : Replaced by the project version as defined in the project() if it is defined.
Supported Geneator expressions
------------------------------
$<INSTALL_INTERFACE:...>: Replaced by empty string.
$<BUILD_INTERFACE:...>: Supported and added in output.