initial commit
working C++ Development Setup on Linux (VS Code + CMake + vcpkg + clang )
This commit is contained in:
3
cplusplus/geminitutorial/.vscode/settings.json
vendored
Normal file
3
cplusplus/geminitutorial/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"cmake.sourceDirectory": "/home/ys/family-repo/Code/cplusplus/geminitutorial/tutorial1"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"cmake.sourceDirectory": "/home/ys/code/cplusplus/GeminiTutorial/tutorial-1",
|
||||
"cmake.sourceDirectory": "/home/ys/family-repo/Code/cplusplus/geminitutorial/tutorial1",
|
||||
"cmake.configureArgs": [
|
||||
"-DCMAKE_TOOLCHAIN_FILE=/home/ys/code/cplusplus/vcpkg/scripts/buildsystems/vcpkg.cmake"
|
||||
"-DCMAKE_TOOLCHAIN_FILE=/home/ys/family-repo/Code/cplusplus/tools/vcpkg/scripts/buildsystems/vcpkg.cmake"
|
||||
]
|
||||
}
|
||||
11
cplusplus/learning/.vscode/settings.json
vendored
Normal file
11
cplusplus/learning/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
|
||||
|
||||
"cmake.configureSettings": {
|
||||
"CMAKE_TOOLCHAIN_FILE": "/home/ys/family-repo/Code/cplusplus/tools/vcpkg/scripts/buildsystems/vcpkg.cmake",
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
|
||||
},
|
||||
|
||||
"cmake.generator": "Ninja"
|
||||
}
|
||||
|
||||
13
cplusplus/learning/CMakeLists.txt
Normal file
13
cplusplus/learning/CMakeLists.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.21)
|
||||
|
||||
project(cpp_learning
|
||||
VERSION 0.1
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
add_subdirectory(tut1)
|
||||
add_subdirectory(tut2)
|
||||
3
cplusplus/learning/tut1/CMakeLists.txt
Normal file
3
cplusplus/learning/tut1/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
find_package(fmt CONFIG REQUIRED)
|
||||
add_executable(tut1 main.cpp)
|
||||
target_link_libraries(tut1 PRIVATE fmt::fmt)
|
||||
12
cplusplus/learning/tut1/main.cpp
Normal file
12
cplusplus/learning/tut1/main.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <iostream>
|
||||
#include <fmt/core.h>
|
||||
|
||||
|
||||
int main() {
|
||||
std::cout << "Hello from tut1\n";
|
||||
fmt::print("Hello from {} using fmt {}\n", "tut1", FMT_VERSION);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
1
cplusplus/learning/tut2/CMakeLists.txt
Normal file
1
cplusplus/learning/tut2/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
||||
add_executable(tut2 main.cpp)
|
||||
6
cplusplus/learning/tut2/main.cpp
Normal file
6
cplusplus/learning/tut2/main.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <iostream>
|
||||
|
||||
int main() {
|
||||
std::cout << "Hello from tut2\n";
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user