diff --git a/CMakeSettings.json b/CMakeSettings.json new file mode 100644 index 0000000..9eb02bd --- /dev/null +++ b/CMakeSettings.json @@ -0,0 +1,95 @@ +{ + "configurations": [ + { + "name": "x64 Local Debug", + "generator": "Visual Studio 17 2022 Win64", + "configurationType": "Debug", + "inheritEnvironments": [ "msvc_x64_x64" ], + "buildRoot": "${projectDir}\\out\\build\\${name}", + "installRoot": "${projectDir}\\out\\install\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "", + "environments": [ + { + "PATH": "C:\\Qt\\Qt5.14.2\\5.14.2\\msvc2017_64\\bin;${env.PATH}", + "VCPKG_ROOT": "D:/vcpkg" + } + ], + "variables": [ + { + "name": "CMAKE_PREFIX_PATH", + "value": "C:\\Qt\\Qt5.14.2\\5.14.2\\msvc2017_64" + }, + { + "name": "CMAKE_TOOLCHAIN_FILE", + "value": "${env.VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" + } + ] + }, + { + "name": "x64 Local Release", + "generator": "Visual Studio 17 2022 Win64", + "configurationType": "Release", + "inheritEnvironments": [ "msvc_x64_x64" ], + "buildRoot": "${projectDir}\\out\\build\\${name}", + "installRoot": "${projectDir}\\out\\install\\${name}", + "environments": [ + { + "PATH": "C:\\Qt\\Qt5.14.2\\5.14.2\\msvc2017_64\\bin;${env.PATH}", + "VCPKG_ROOT": "D:/vcpkg" + } + ], + "variables": [ + { + "name": "CMAKE_PREFIX_PATH", + "value": "C:\\Qt\\Qt5.14.2\\5.14.2\\msvc2017_64" + }, + { + "name": "CMAKE_TOOLCHAIN_FILE", + "value": "${env.VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" + } + ] + }, + { + "name": "x64 Linux Debug", + "generator": "Ninja", + "configurationType": "Debug", + "cmakeExecutable": "cmake", + "remoteCopySourcesExclusionList": [ ".vs", "out" ], + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "", + "inheritEnvironments": [ "linux_x64" ], + "remoteMachineName": "${defaultRemoteMachineName}", + "remoteCMakeListsRoot": "$HOME/vs/${projectDirName}/${workspaceHash}/src", + "remoteBuildRoot": "$HOME/vs/${projectDirName}/${workspaceHash}/out/build/${name}", + "remoteInstallRoot": "$HOME/vs/${projectDirName}/${workspaceHash}/out/install/${name}", + "remoteCopySources": true, + "rsyncCommandArgs": "-t --delete", + "remoteCopyBuildOutput": false, + "remoteCopySourcesMethod": "rsync", + "variables": [] + }, + { + "name": "x64 Linux Release", + "generator": "Ninja", + "configurationType": "Release", + "cmakeExecutable": "cmake", + "remoteCopySourcesExclusionList": [ ".vs", "out" ], + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "", + "inheritEnvironments": [ "linux_x64" ], + "remoteMachineName": "${defaultRemoteMachineName}", + "remoteCMakeListsRoot": "$HOME/vs/${projectDirName}/${workspaceHash}/src", + "remoteBuildRoot": "$HOME/vs/${projectDirName}/${workspaceHash}/out/build/${name}", + "remoteInstallRoot": "$HOME/vs/${projectDirName}/${workspaceHash}/out/install/${name}", + "remoteCopySources": true, + "rsyncCommandArgs": "-t --delete", + "remoteCopyBuildOutput": false, + "remoteCopySourcesMethod": "rsync", + "variables": [] + } + ] +} \ No newline at end of file diff --git a/main.cpp b/main.cpp index 839fd57..56ded65 100644 --- a/main.cpp +++ b/main.cpp @@ -81,6 +81,7 @@ bool handle_work(const std::string& source_dir, const std::string& purpose) ret[1] = static_cast(cp("main.cpp")); ret[2] = static_cast(cp(".clang-format")); ret[3] = static_cast(cp(".gitignore")); + ret[4] = static_cast(cp("CMakeSettings.json")); fs::path vscodeConfig(source_dir); vscodeConfig.append(".vscode/settings.json"); diff --git a/template/.gitignore b/template/.gitignore index 5b861d3..03b6eee 100644 --- a/template/.gitignore +++ b/template/.gitignore @@ -1,4 +1,45 @@ +# Prerequisites +*.d +.idea +cmake-build-* + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +!lebo_motor.lib +!lebo_motor.dll +!liblebo_motor.so + +# Executables +*.exe +*.out +*.app build +*.user +compile_commands.json .vs +out .cache -cmake-* \ No newline at end of file +CMakeLists.txt.* \ No newline at end of file diff --git a/template/CMakeSettings.json b/template/CMakeSettings.json new file mode 100644 index 0000000..9eb02bd --- /dev/null +++ b/template/CMakeSettings.json @@ -0,0 +1,95 @@ +{ + "configurations": [ + { + "name": "x64 Local Debug", + "generator": "Visual Studio 17 2022 Win64", + "configurationType": "Debug", + "inheritEnvironments": [ "msvc_x64_x64" ], + "buildRoot": "${projectDir}\\out\\build\\${name}", + "installRoot": "${projectDir}\\out\\install\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "", + "environments": [ + { + "PATH": "C:\\Qt\\Qt5.14.2\\5.14.2\\msvc2017_64\\bin;${env.PATH}", + "VCPKG_ROOT": "D:/vcpkg" + } + ], + "variables": [ + { + "name": "CMAKE_PREFIX_PATH", + "value": "C:\\Qt\\Qt5.14.2\\5.14.2\\msvc2017_64" + }, + { + "name": "CMAKE_TOOLCHAIN_FILE", + "value": "${env.VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" + } + ] + }, + { + "name": "x64 Local Release", + "generator": "Visual Studio 17 2022 Win64", + "configurationType": "Release", + "inheritEnvironments": [ "msvc_x64_x64" ], + "buildRoot": "${projectDir}\\out\\build\\${name}", + "installRoot": "${projectDir}\\out\\install\\${name}", + "environments": [ + { + "PATH": "C:\\Qt\\Qt5.14.2\\5.14.2\\msvc2017_64\\bin;${env.PATH}", + "VCPKG_ROOT": "D:/vcpkg" + } + ], + "variables": [ + { + "name": "CMAKE_PREFIX_PATH", + "value": "C:\\Qt\\Qt5.14.2\\5.14.2\\msvc2017_64" + }, + { + "name": "CMAKE_TOOLCHAIN_FILE", + "value": "${env.VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" + } + ] + }, + { + "name": "x64 Linux Debug", + "generator": "Ninja", + "configurationType": "Debug", + "cmakeExecutable": "cmake", + "remoteCopySourcesExclusionList": [ ".vs", "out" ], + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "", + "inheritEnvironments": [ "linux_x64" ], + "remoteMachineName": "${defaultRemoteMachineName}", + "remoteCMakeListsRoot": "$HOME/vs/${projectDirName}/${workspaceHash}/src", + "remoteBuildRoot": "$HOME/vs/${projectDirName}/${workspaceHash}/out/build/${name}", + "remoteInstallRoot": "$HOME/vs/${projectDirName}/${workspaceHash}/out/install/${name}", + "remoteCopySources": true, + "rsyncCommandArgs": "-t --delete", + "remoteCopyBuildOutput": false, + "remoteCopySourcesMethod": "rsync", + "variables": [] + }, + { + "name": "x64 Linux Release", + "generator": "Ninja", + "configurationType": "Release", + "cmakeExecutable": "cmake", + "remoteCopySourcesExclusionList": [ ".vs", "out" ], + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "", + "inheritEnvironments": [ "linux_x64" ], + "remoteMachineName": "${defaultRemoteMachineName}", + "remoteCMakeListsRoot": "$HOME/vs/${projectDirName}/${workspaceHash}/src", + "remoteBuildRoot": "$HOME/vs/${projectDirName}/${workspaceHash}/out/build/${name}", + "remoteInstallRoot": "$HOME/vs/${projectDirName}/${workspaceHash}/out/install/${name}", + "remoteCopySources": true, + "rsyncCommandArgs": "-t --delete", + "remoteCopyBuildOutput": false, + "remoteCopySourcesMethod": "rsync", + "variables": [] + } + ] +} \ No newline at end of file