From 0b4576300fd29ad9bfd89b2aadbf02edc38315a4 Mon Sep 17 00:00:00 2001 From: connellpaxton Date: Wed, 3 Jan 2024 23:35:42 -0500 Subject: [PATCH] Add project files. --- CMakeLists.txt | 21 ++++++++++ CMakePresets.json | 101 ++++++++++++++++++++++++++++++++++++++++++++++ pléascach.cpp | 6 +++ pléascach.h | 3 ++ 4 files changed, 131 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 CMakePresets.json create mode 100644 pléascach.cpp create mode 100644 pléascach.h diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..6c4b2c9 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,21 @@ +# CMakeList.txt : CMake project for pléascach, include source and define +# project specific logic here. +# +cmake_minimum_required (VERSION 3.8) + +# Enable Hot Reload for MSVC compilers if supported. +if (POLICY CMP0141) + cmake_policy(SET CMP0141 NEW) + set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$,$>,$<$:EditAndContinue>,$<$:ProgramDatabase>>") +endif() + +project ("pléascach") + +# Add source to this project's executable. +add_executable (CMakeTarget "pléascach.cpp" "pléascach.h") + +if (CMAKE_VERSION VERSION_GREATER 3.12) + set_property(TARGET CMakeTarget PROPERTY CXX_STANDARD 20) +endif() + +# TODO: Add tests and install targets if needed. diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..f4bc98b --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,101 @@ +{ + "version": 3, + "configurePresets": [ + { + "name": "windows-base", + "hidden": true, + "generator": "Ninja", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "installDir": "${sourceDir}/out/install/${presetName}", + "cacheVariables": { + "CMAKE_C_COMPILER": "cl.exe", + "CMAKE_CXX_COMPILER": "cl.exe" + }, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + } + }, + { + "name": "x64-debug", + "displayName": "x64 Debug", + "inherits": "windows-base", + "architecture": { + "value": "x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "x64-release", + "displayName": "x64 Release", + "inherits": "x64-debug", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "x86-debug", + "displayName": "x86 Debug", + "inherits": "windows-base", + "architecture": { + "value": "x86", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "x86-release", + "displayName": "x86 Release", + "inherits": "x86-debug", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "linux-debug", + "displayName": "Linux Debug", + "generator": "Ninja", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "installDir": "${sourceDir}/out/install/${presetName}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + }, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Linux" + }, + "vendor": { + "microsoft.com/VisualStudioRemoteSettings/CMake/1.0": { + "sourceDir": "$env{HOME}/.vs/$ms{projectDirName}" + } + } + }, + { + "name": "macos-debug", + "displayName": "macOS Debug", + "generator": "Ninja", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "installDir": "${sourceDir}/out/install/${presetName}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + }, + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Darwin" + }, + "vendor": { + "microsoft.com/VisualStudioRemoteSettings/CMake/1.0": { + "sourceDir": "$env{HOME}/.vs/$ms{projectDirName}" + } + } + } + ] +} diff --git a/pléascach.cpp b/pléascach.cpp new file mode 100644 index 0000000..f9f2269 --- /dev/null +++ b/pléascach.cpp @@ -0,0 +1,6 @@ +#include "pléascach.h" + + +int main() { + std::cout << "triail" << std::endl; +} diff --git a/pléascach.h b/pléascach.h new file mode 100644 index 0000000..44619fc --- /dev/null +++ b/pléascach.h @@ -0,0 +1,3 @@ +#pragma once + +#include