From 01eacdb83f4e485ba96d68a514b3da1f6c3495d2 Mon Sep 17 00:00:00 2001 From: zyuan Date: Mon, 23 Jun 2025 14:12:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0gitignore=E5=92=8C=E5=88=9D?= =?UTF-8?q?=E7=89=88CMakeLists.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ CMakeLists.txt | 25 +++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 .gitignore create mode 100644 CMakeLists.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bf8edd2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,50 @@ +# --- 构建目录 --- +/build*/ +/*build*/ +*/build* +*.xcodeproj +*.vcxproj* +*.sln +*.suo +*.opensdf +*.sdf + +# --- 编译产物 --- +*.o +*.a +*.so +*.dll +*.exe +*.out +*.app + +# --- CMake 生成文件 --- +CMakeCache.txt +CMakeFiles/ +cmake_install.cmake +Makefile +CTestTestfile.cmake +*.cmake + +# --- 临时文件 --- +*~ +*.swp +*.bak +*.tmp + +# --- IDE 相关 --- +.vscode/ +.idea/ +.clion/ +*.code-workspace + +# --- 系统文件 --- +.DS_Store +Thumbs.db + +# Windows 可执行文件 +*.ilk +*.pdb +*.exp +*.manifest +*.lib \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e6b89ab --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.5) + +project(DPS) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + +include_directories(include) + +file(GLOB SOURCES "DataPlatform/*.cpp") + +add_executable(${PROJECT_NAME} ${SOURCES}) + +install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib +) +