From a1a8766f36775368517f6848259af3da5dacf8ae Mon Sep 17 00:00:00 2001 From: Thomas Schleicher Date: Tue, 22 Oct 2024 13:33:14 +0200 Subject: [PATCH] batman --- .gitignore | 2 ++ CMakeLists.txt | 18 ++++++++++++++++++ src/main.cpp | 8 ++++++++ 3 files changed, 28 insertions(+) create mode 100644 .gitignore create mode 100644 CMakeLists.txt create mode 100644 src/main.cpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1b72d0a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +cmake-build-debug +.idea \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e6f502f --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.16) + +project(short-link VERSION 1.0 LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 23) +set(CMAKE_CXX_STANDARD_REQUIRED True) + +add_executable(Application src/main.cpp) + +find_package(Boost REQUIRED COMPONENTS filesystem system) + +if(Boost_FOUND) + include_directories(${Boost_INCLUDE_DIRS}) + link_directories(${Boost_LIBRARY_DIRS}) + target_link_libraries(Application PRIVATE Boost::filesystem Boost::system) +else() + message(FATAL_ERROR "Boost not found!") +endif() \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..2dc9dbb --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,8 @@ +#include +#include + +using namespace std; + +int main(int argc, char *argv[]) { + cout << "Boost version: " << BOOST_LIB_VERSION << endl; +} \ No newline at end of file