diff --git a/.gitignore b/.gitignore index c7e5016..090a0c8 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ compile_commands.json CTestTestfile.cmake _deps CMakeUserPresets.json +out # ---> JetBrains # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider @@ -709,7 +710,8 @@ dkms.conf .LSOverride # Icon must end with two \r -Icon +Icon + # Thumbnails ._* diff --git a/BDPng.cpp b/BDPng.cpp new file mode 100644 index 0000000..90f6de1 --- /dev/null +++ b/BDPng.cpp @@ -0,0 +1,5 @@ +#include + +void say_hello(){ + std::cout << "Hello, from BDPng!\n"; +} diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..f36edb9 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.10.0) +project(BDPng VERSION 0.1.0 LANGUAGES C CXX) + +add_library(BDPng BDPng.cpp) + +include(CTest) +enable_testing() + diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..8e31bb1 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,17 @@ +{ + "version": 8, + "configurePresets": [ + { + "name": "Clang", + "displayName": "使用工具链文件配置预设", + "description": "设置 Ninja 生成器、版本和安装目录", + "generator": "Ninja", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_TOOLCHAIN_FILE": "", + "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}" + } + } + ] +} \ No newline at end of file