Skip to content

Commit f631df4

Browse files
committed
更新项目文件,修改一些笔误。
1 parent 1a440ce commit f631df4

File tree

6 files changed

+88
-1
lines changed

6 files changed

+88
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ node_modules/
4141
.vs/
4242
x64/
4343
out/
44+
*.ilk
45+
*.pdb
4446

4547
CMakePresets.json
4648
CMakeUserPresets.json
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#include <iostream>
2+
3+
int main(){
4+
std::cout << "Hello World" << std::endl;
5+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
cmake_minimum_required (VERSION 3.8)
2+
3+
project ("ModernCpp-ConcurrentProgramming-Tutorial")
4+
5+
set(CMAKE_CXX_STANDARD 17)
6+
7+
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
8+
9+
if(MSVC)
10+
add_compile_options("/utf-8" "/permissive-")
11+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
12+
add_compile_options("-finput-charset=UTF-8" "-fexec-charset=UTF-8")
13+
endif()
14+
15+
add_executable(ModernCpp-ConcurrentProgramming-Tutorial "01-HelloWorld.cpp")
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "x64-Debug",
5+
"generator": "Ninja",
6+
"configurationType": "Debug",
7+
"inheritEnvironments": [ "msvc_x64_x64" ],
8+
"buildRoot": "${projectDir}\\out\\build\\${name}",
9+
"installRoot": "${projectDir}\\out\\install\\${name}",
10+
"cmakeCommandArgs": "",
11+
"buildCommandArgs": "",
12+
"ctestCommandArgs": ""
13+
},
14+
{
15+
"name": "x64-Release",
16+
"generator": "Ninja",
17+
"configurationType": "RelWithDebInfo",
18+
"buildRoot": "${projectDir}\\out\\build\\${name}",
19+
"installRoot": "${projectDir}\\out\\install\\${name}",
20+
"cmakeCommandArgs": "",
21+
"buildCommandArgs": "",
22+
"ctestCommandArgs": "",
23+
"inheritEnvironments": [ "msvc_x64_x64" ],
24+
"variables": []
25+
},
26+
{
27+
"name": "x86-Debug",
28+
"generator": "Ninja",
29+
"configurationType": "Debug",
30+
"buildRoot": "${projectDir}\\out\\build\\${name}",
31+
"installRoot": "${projectDir}\\out\\install\\${name}",
32+
"cmakeCommandArgs": "",
33+
"buildCommandArgs": "",
34+
"ctestCommandArgs": "",
35+
"inheritEnvironments": [ "msvc_x86" ],
36+
"variables": []
37+
},
38+
{
39+
"name": "x86-Release",
40+
"generator": "Ninja",
41+
"configurationType": "RelWithDebInfo",
42+
"buildRoot": "${projectDir}\\out\\build\\${name}",
43+
"installRoot": "${projectDir}\\out\\install\\${name}",
44+
"cmakeCommandArgs": "",
45+
"buildCommandArgs": "",
46+
"ctestCommandArgs": "",
47+
"inheritEnvironments": [ "msvc_x86" ],
48+
"variables": []
49+
},
50+
{
51+
"name": "x64-Clang-Debug",
52+
"generator": "Ninja",
53+
"configurationType": "Debug",
54+
"buildRoot": "${projectDir}\\out\\build\\${name}",
55+
"installRoot": "${projectDir}\\out\\install\\${name}",
56+
"cmakeCommandArgs": "",
57+
"buildCommandArgs": "",
58+
"ctestCommandArgs": "",
59+
"inheritEnvironments": [ "clang_cl_x64_x64" ],
60+
"variables": []
61+
}
62+
]
63+
}

md/05内存模型与原子操作.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ RISC-V 采用的也是**弱序内存模型**(weakly-ordered memory model),
791791
792792
- `ARM` 和 `RISC-V` 都是弱序内存模型,为什么不同?
793793
794-
各位一定要区分,这种强弱其实也只是一种分类而已,不同的指令集架构大多都还是有所不同的,并不会完全一样。例如: `x86` 的 TSO(Total Store Order)是强一致性模型的一种,但并不是所有强一致性模型都是 TSO
794+
各位一定要区分,这种强弱其实也只是一种分类而已,不同的指令集架构大多都还是有所不同的,并不会完全一样。例如: `x86` 的 TSO(Total Store Order)是强一致性模型的一种,但并不是所有强一致性模型都是 TSO
795795
796796
### 宽松定序
797797

md/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
&emsp;&emsp;我们的代码风格较为简洁明了,命名全部使用下划线连接,而不是驼峰命名法。花括号通常只占一行,简短的代码可以不额外占行。一般初始化时使用 `{}`,而非 `()` 或者 `=` 。这样简单直观,避免歧义和许多问题。`#include` 引入头文件时需要在尖括号或引号前后加空格。
2222

2323
```cpp
24+
#include <iostream>
25+
2426
struct move_only{
2527
move_only() { std::puts("默认构造"); }
2628
move_only(move_only&&)noexcept { std::puts("移动构造"); }

0 commit comments

Comments
 (0)