Skip to content

Commit 6c1e388

Browse files
committed
Add root, x64 and x32 conditions
1 parent 0490537 commit 6c1e388

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/cmake-toml.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ linux = "CMAKE_SYSTEM_NAME MATCHES \"Linux\""
7070
gcc = "CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\" OR CMAKE_C_COMPILER_ID STREQUAL \"GNU\""
7171
clang = "CMAKE_CXX_COMPILER_ID MATCHES \"Clang\" OR CMAKE_C_COMPILER_ID MATCHES \"Clang\""
7272
msvc = "MSVC"
73+
root = "CMKR_ROOT_PROJECT"
74+
x64 = "CMAKE_SIZEOF_VOID_P EQUAL 8"
75+
x32 = "CMAKE_SIZEOF_VOID_P EQUAL 4"
7376
```
7477

7578
## Subdirectories

src/project_parser.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ Project::Project(const Project *parent, const std::string &path, bool build) {
236236
conditions["gcc"] = R"cmake(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "GNU")cmake";
237237
conditions["clang"] = R"cmake(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "Clang")cmake";
238238
conditions["msvc"] = R"cmake(MSVC)cmake";
239+
conditions["root"] = R"cmake(CMKR_ROOT_PROJECT)cmake";
240+
conditions["x64"] = R"cmake(CMAKE_SIZEOF_VOID_P EQUAL 8)cmake";
241+
conditions["x32"] = R"cmake(CMAKE_SIZEOF_VOID_P EQUAL 4)cmake";
239242
} else {
240243
conditions = parent->conditions;
241244
}

0 commit comments

Comments
 (0)