浏览代码

Update project

Specify build instructions.
master
父节点
当前提交
de19f6437d
共有 5 个文件被更改,包括 14 次插入14 次删除
  1. +1
    -0
      .gitignore
  2. +4
    -4
      CMakeLists.txt
  3. +7
    -8
      README.md
  4. +1
    -1
      types/int.h
  5. +1
    -1
      types/string.h

+ 1
- 0
.gitignore 查看文件

@@ -1,2 +1,3 @@
.idea/
cmake-build-*/
build/

+ 4
- 4
CMakeLists.txt 查看文件

@@ -11,8 +11,8 @@ add_library(
ini_config STATIC
ini-config.c
ini-config.h
ini-config/types/int.c
ini-config/types/int.h
ini-config/types/string.c
ini-config/types/string.h
types/int.c
types/int.h
types/string.c
types/string.h
)

+ 7
- 8
README.md 查看文件

@@ -1,10 +1,9 @@
## Procedure
# `ini-config`

Subsystem calls its initialize method.
## Building

1. Subsystem copies hardcoded default values to its in-memory state container.
2. Subsystem defines the available config items it has, and how it is connected to various config sources (i.e. specify its section and key in the config file, as well as supplying command line options connected to this config item).
3. Subsystem binds the config items with their respective sections and keys in the config file (i.e. correctly point the values to the respective internal state container of the app).
4. Subsystem retrieves the config file values as well as command line arguments (higher priority) supplied to the app upon invocation.
5. Subsystem checks if there are some volatile state data to retrieve and syncs it with the state.
6. Subsystem saves the state to the config file.
```shell
mkdir build
cmake "-DCMAKE_MT=%CMAKE_MT%" -G Ninja -S . -B build
cmake --build build -t ini_config
```

+ 1
- 1
types/int.h 查看文件

@@ -1,7 +1,7 @@
#ifndef INI_CONFIG_TYPES_INT_H
#define INI_CONFIG_TYPES_INT_H

#include "ini-config.h"
#include "../ini-config.h"

INI_CONFIG_DECLARE_TYPE(U8);
#define INI_CONFIG_TYPE_U8 (INI_ConfigType) { \


+ 1
- 1
types/string.h 查看文件

@@ -1,7 +1,7 @@
#ifndef INI_CONFIG_TYPES_STRING_H
#define INI_CONFIG_TYPES_STRING_H

#include "ini-config.h"
#include "../ini-config.h"

INI_CONFIG_DECLARE_TYPE(String);
#define INI_CONFIG_TYPE_STRING(X) (INI_ConfigType) { \


正在加载...
取消
保存