From ff5ffcff6397a17b2ff098981090bbc889d0cad1 Mon Sep 17 00:00:00 2001 From: zcy <290198252@qq.com> Date: Mon, 8 Mar 2021 12:01:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0c++11=E7=89=B9=E6=80=A7?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/src/cpp11/.vscode/c_cpp_properties.json | 23 +++++++++++++++++ test/src/cpp11/.vscode/launch.json | 27 ++++++++++++++++++++ test/src/cpp11/.vscode/settings.json | 5 ++++ test/src/cpp11/CMakeLists.txt | 7 +++++ test/src/cpp11/cpp11_test.cpp | 10 ++++++++ 5 files changed, 72 insertions(+) create mode 100644 test/src/cpp11/.vscode/c_cpp_properties.json create mode 100644 test/src/cpp11/.vscode/launch.json create mode 100644 test/src/cpp11/.vscode/settings.json create mode 100644 test/src/cpp11/CMakeLists.txt create mode 100644 test/src/cpp11/cpp11_test.cpp diff --git a/test/src/cpp11/.vscode/c_cpp_properties.json b/test/src/cpp11/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..ec9f159 --- /dev/null +++ b/test/src/cpp11/.vscode/c_cpp_properties.json @@ -0,0 +1,23 @@ +{ + "configurations": [ + { + "name": "Win32", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [ + "_DEBUG", + "UNICODE", + "_UNICODE" + ], + "windowsSdkVersion": "10.0.17763.0", + "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe", + "cStandard": "c17", + "cppStandard": "c++17", + "intelliSenseMode": "windows-msvc-x64", + "configurationProvider": "ms-vscode.cmake-tools", + "compileCommands": "${workspaceFolder}/build/compile_commands.json" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/test/src/cpp11/.vscode/launch.json b/test/src/cpp11/.vscode/launch.json new file mode 100644 index 0000000..50477bc --- /dev/null +++ b/test/src/cpp11/.vscode/launch.json @@ -0,0 +1,27 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "C++ Launch (GDB)", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/cpp11.exe", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "为 gdb 启用整齐打印", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + ] +} \ No newline at end of file diff --git a/test/src/cpp11/.vscode/settings.json b/test/src/cpp11/.vscode/settings.json new file mode 100644 index 0000000..e2c18d1 --- /dev/null +++ b/test/src/cpp11/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "ostream": "cpp" + } +} \ No newline at end of file diff --git a/test/src/cpp11/CMakeLists.txt b/test/src/cpp11/CMakeLists.txt new file mode 100644 index 0000000..991424e --- /dev/null +++ b/test/src/cpp11/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(cpp11) + +message("current dir" ${CMAKE_CURRENT_SOURCE_DIR}) + + +add_executable(cpp11 cpp11_test.cpp ) \ No newline at end of file diff --git a/test/src/cpp11/cpp11_test.cpp b/test/src/cpp11/cpp11_test.cpp new file mode 100644 index 0000000..ad47ce4 --- /dev/null +++ b/test/src/cpp11/cpp11_test.cpp @@ -0,0 +1,10 @@ +#include +using namespace std; +#include + +int main(){ + int x; + cout<<"hello world"<