更新关于nlohmann的依赖

This commit is contained in:
2025-07-29 11:01:54 +08:00
parent e87627dec9
commit 4ab5c2378a
5 changed files with 8 additions and 23 deletions

4
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule "Convention/[nlohmann]"]
path = Convention/[nlohmann]
[submodule "Convention/nlohmann"]
path = Convention/nlohmann
url = https://github.com/nlohmann/json.git

View File

@@ -1,5 +1,6 @@
message("Convention: --- ----- ----- ----- ----- --")
include_directories(${PROJECT_SOURCE_DIR}/Convention/nlohmann/include)
install(DIRECTORY [Runtime]
DESTINATION ${CMAKE_INSTALL_PREFIX}/include
FILES_MATCHING PATTERN "*.*"

View File

@@ -1,4 +1,5 @@
add_executable(TEST test.cpp )
include_directories(${PROJECT_SOURCE_DIR}/Convention/[Runtime])
include_directories(${PROJECT_SOURCE_DIR}/Convention/nlohmann/include)
install(TARGETS TEST
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)

View File

@@ -1,26 +1,10 @@
//#include"Config.hpp"
#include"Architecture.hpp"
#include<Config.hpp>
#include<GlobalConfig.hpp>
using namespace std;
#include <iostream>
#include<vector>
#include<map>
using namespace std;
using namespace Convention;
int main()
{
double t = 0;
for (int i = 1; i < 80; i++)
{
t += 1.0 / (double)i;
}
double k = 0;
for (int i = 1; i < 80; i++)
{
k += 1.0 / (double)i;
cout << i << ":\t" << k << "/" << t << "\t=\t" << k / t * 100 << "% current step:\t" <<
1.0 / (double)i << endl;
}
return 0;
cout << ProjectConfig().LoadProperties().FindItem<std::string>("test", "test") << endl;
}