Skip to content

Commit dcdc7ac

Browse files
committed
Add a few more default named conditions
1 parent 88377a8 commit dcdc7ac

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

docs/cmake-toml.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ clang-any = "CMAKE_CXX_COMPILER_ID MATCHES \"Clang\" OR CMAKE_C_COMPILER_ID MATC
109109
root = "CMKR_ROOT_PROJECT"
110110
x64 = "CMAKE_SIZEOF_VOID_P EQUAL 8"
111111
x32 = "CMAKE_SIZEOF_VOID_P EQUAL 4"
112+
android = "ANDROID"
113+
apple = "APPLE"
114+
bsd = "BSD"
115+
cygwin = "CYGWIN"
116+
ios = "IOS"
117+
xcode = "XCODE"
118+
wince = "WINCE"
112119
```
113120

114121
## Subdirectories

src/project_parser.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,13 @@ Project::Project(const Project *parent, const std::string &path, bool build) : p
274274
conditions["root"] = R"cmake(CMKR_ROOT_PROJECT)cmake";
275275
conditions["x64"] = R"cmake(CMAKE_SIZEOF_VOID_P EQUAL 8)cmake";
276276
conditions["x32"] = R"cmake(CMAKE_SIZEOF_VOID_P EQUAL 4)cmake";
277+
conditions["android"] = R"cmake(ANDROID)cmake";
278+
conditions["apple"] = R"cmake(APPLE)cmake";
279+
conditions["bsd"] = R"cmake(BSD)cmake";
280+
conditions["cygwin"] = R"cmake(CYGWIN)cmake";
281+
conditions["ios"] = R"cmake(IOS)cmake";
282+
conditions["xcode"] = R"cmake(XCODE)cmake";
283+
conditions["wince"] = R"cmake(WINCE)cmake";
277284
} else {
278285
conditions = parent->conditions;
279286
templates = parent->templates;

0 commit comments

Comments
 (0)