[Misc] Remove files I no longer use
This commit is contained in:
parent
6c030a639a
commit
d6917c0f49
@ -1,58 +0,0 @@
|
|||||||
---
|
|
||||||
AlignAfterOpenBracket: Align
|
|
||||||
AlignConsecutiveAssignments: 'true'
|
|
||||||
AlignEscapedNewlines: Left
|
|
||||||
AlignOperands: 'true'
|
|
||||||
AlignTrailingComments: 'true'
|
|
||||||
AllowAllParametersOfDeclarationOnNextLine: 'true'
|
|
||||||
AllowShortBlocksOnASingleLine: 'true'
|
|
||||||
AllowShortCaseLabelsOnASingleLine: 'true'
|
|
||||||
AllowShortFunctionsOnASingleLine: Empty
|
|
||||||
AllowShortIfStatementsOnASingleLine: 'false'
|
|
||||||
AllowShortLoopsOnASingleLine: 'false'
|
|
||||||
AlwaysBreakAfterReturnType: None
|
|
||||||
AlwaysBreakBeforeMultilineStrings: 'false'
|
|
||||||
AlwaysBreakTemplateDeclarations: 'true'
|
|
||||||
BinPackArguments: 'true'
|
|
||||||
BinPackParameters: 'true'
|
|
||||||
BreakAfterJavaFieldAnnotations: 'true'
|
|
||||||
BreakBeforeBinaryOperators: All
|
|
||||||
BreakBeforeBraces: Linux
|
|
||||||
BreakBeforeInheritanceComma: 'false'
|
|
||||||
BreakBeforeTernaryOperators: 'true'
|
|
||||||
BreakConstructorInitializers: BeforeColon
|
|
||||||
BreakStringLiterals: 'true'
|
|
||||||
ColumnLimit: '80'
|
|
||||||
CompactNamespaces: 'false'
|
|
||||||
ConstructorInitializerAllOnOneLineOrOnePerLine: 'false'
|
|
||||||
Cpp11BracedListStyle: 'true'
|
|
||||||
FixNamespaceComments: 'true'
|
|
||||||
IncludeBlocks: Regroup
|
|
||||||
IndentCaseLabels: 'false'
|
|
||||||
IndentPPDirectives: AfterHash
|
|
||||||
IndentWrappedFunctionNames: 'false'
|
|
||||||
JavaScriptQuotes: Leave
|
|
||||||
JavaScriptWrapImports: 'true'
|
|
||||||
KeepEmptyLinesAtTheStartOfBlocks: 'false'
|
|
||||||
Language: Cpp
|
|
||||||
MaxEmptyLinesToKeep: '1'
|
|
||||||
NamespaceIndentation: Inner
|
|
||||||
PointerAlignment: Right
|
|
||||||
ReflowComments: 'true'
|
|
||||||
SortIncludes: 'true'
|
|
||||||
SortUsingDeclarations: 'true'
|
|
||||||
SpaceAfterCStyleCast: 'false'
|
|
||||||
SpaceAfterTemplateKeyword: 'false'
|
|
||||||
SpaceBeforeAssignmentOperators: 'true'
|
|
||||||
SpaceBeforeParens: ControlStatements
|
|
||||||
SpaceInEmptyParentheses: 'false'
|
|
||||||
SpacesBeforeTrailingComments: '2'
|
|
||||||
SpacesInAngles: 'false'
|
|
||||||
SpacesInCStyleCastParentheses: 'false'
|
|
||||||
SpacesInContainerLiterals: 'false'
|
|
||||||
SpacesInParentheses: 'false'
|
|
||||||
SpacesInSquareBrackets: 'false'
|
|
||||||
Standard: Cpp11
|
|
||||||
UseTab: ForIndentation
|
|
||||||
|
|
||||||
...
|
|
179
dev/conan-project/.gitignore
vendored
179
dev/conan-project/.gitignore
vendored
@ -1,179 +0,0 @@
|
|||||||
# Created by https://www.gitignore.io/api/c,c++,ninja,macos,linux,cmake,windows,visualstudiocode
|
|
||||||
# Edit at https://www.gitignore.io/?templates=c,c++,ninja,macos,linux,cmake,windows,visualstudiocode
|
|
||||||
|
|
||||||
### C ###
|
|
||||||
# Prerequisites
|
|
||||||
*.d
|
|
||||||
|
|
||||||
# Object files
|
|
||||||
*.o
|
|
||||||
*.ko
|
|
||||||
*.obj
|
|
||||||
*.elf
|
|
||||||
|
|
||||||
# Linker output
|
|
||||||
*.ilk
|
|
||||||
*.map
|
|
||||||
*.exp
|
|
||||||
|
|
||||||
# Precompiled Headers
|
|
||||||
*.gch
|
|
||||||
*.pch
|
|
||||||
|
|
||||||
# Libraries
|
|
||||||
*.lib
|
|
||||||
*.a
|
|
||||||
*.la
|
|
||||||
*.lo
|
|
||||||
|
|
||||||
# Shared objects (inc. Windows DLLs)
|
|
||||||
*.dll
|
|
||||||
*.so
|
|
||||||
*.so.*
|
|
||||||
*.dylib
|
|
||||||
|
|
||||||
# Executables
|
|
||||||
*.exe
|
|
||||||
*.out
|
|
||||||
*.app
|
|
||||||
*.i*86
|
|
||||||
*.x86_64
|
|
||||||
*.hex
|
|
||||||
|
|
||||||
# Debug files
|
|
||||||
*.dSYM/
|
|
||||||
*.su
|
|
||||||
*.idb
|
|
||||||
*.pdb
|
|
||||||
|
|
||||||
# Kernel Module Compile Results
|
|
||||||
*.mod*
|
|
||||||
*.cmd
|
|
||||||
.tmp_versions/
|
|
||||||
modules.order
|
|
||||||
Module.symvers
|
|
||||||
Mkfile.old
|
|
||||||
dkms.conf
|
|
||||||
|
|
||||||
### C++ ###
|
|
||||||
# Prerequisites
|
|
||||||
|
|
||||||
# Compiled Object files
|
|
||||||
*.slo
|
|
||||||
|
|
||||||
# Precompiled Headers
|
|
||||||
|
|
||||||
# Compiled Dynamic libraries
|
|
||||||
|
|
||||||
# Fortran module files
|
|
||||||
*.mod
|
|
||||||
*.smod
|
|
||||||
|
|
||||||
# Compiled Static libraries
|
|
||||||
*.lai
|
|
||||||
|
|
||||||
# Executables
|
|
||||||
|
|
||||||
### CMake ###
|
|
||||||
CMakeLists.txt.user
|
|
||||||
CMakeCache.txt
|
|
||||||
CMakeFiles
|
|
||||||
CMakeScripts
|
|
||||||
Testing
|
|
||||||
Makefile
|
|
||||||
cmake_install.cmake
|
|
||||||
install_manifest.txt
|
|
||||||
compile_commands.json
|
|
||||||
CTestTestfile.cmake
|
|
||||||
_deps
|
|
||||||
|
|
||||||
### CMake Patch ###
|
|
||||||
# External projects
|
|
||||||
*-prefix/
|
|
||||||
|
|
||||||
### Linux ###
|
|
||||||
*~
|
|
||||||
|
|
||||||
# temporary files which can be created if a process still has a handle open of a deleted file
|
|
||||||
.fuse_hidden*
|
|
||||||
|
|
||||||
# KDE directory preferences
|
|
||||||
.directory
|
|
||||||
|
|
||||||
# Linux trash folder which might appear on any partition or disk
|
|
||||||
.Trash-*
|
|
||||||
|
|
||||||
# .nfs files are created when an open file is removed but is still being accessed
|
|
||||||
.nfs*
|
|
||||||
|
|
||||||
### macOS ###
|
|
||||||
# General
|
|
||||||
.DS_Store
|
|
||||||
.AppleDouble
|
|
||||||
.LSOverride
|
|
||||||
|
|
||||||
# Icon must end with two \r
|
|
||||||
Icon
|
|
||||||
|
|
||||||
# Thumbnails
|
|
||||||
._*
|
|
||||||
|
|
||||||
# Files that might appear in the root of a volume
|
|
||||||
.DocumentRevisions-V100
|
|
||||||
.fseventsd
|
|
||||||
.Spotlight-V100
|
|
||||||
.TemporaryItems
|
|
||||||
.Trashes
|
|
||||||
.VolumeIcon.icns
|
|
||||||
.com.apple.timemachine.donotpresent
|
|
||||||
|
|
||||||
# Directories potentially created on remote AFP share
|
|
||||||
.AppleDB
|
|
||||||
.AppleDesktop
|
|
||||||
Network Trash Folder
|
|
||||||
Temporary Items
|
|
||||||
.apdisk
|
|
||||||
|
|
||||||
### Ninja ###
|
|
||||||
.ninja_deps
|
|
||||||
.ninja_log
|
|
||||||
|
|
||||||
### VisualStudioCode ###
|
|
||||||
.vscode/*
|
|
||||||
!.vscode/settings.json
|
|
||||||
!.vscode/tasks.json
|
|
||||||
!.vscode/launch.json
|
|
||||||
!.vscode/extensions.json
|
|
||||||
|
|
||||||
### VisualStudioCode Patch ###
|
|
||||||
# Ignore all local history of files
|
|
||||||
.history
|
|
||||||
|
|
||||||
### Windows ###
|
|
||||||
# Windows thumbnail cache files
|
|
||||||
Thumbs.db
|
|
||||||
ehthumbs.db
|
|
||||||
ehthumbs_vista.db
|
|
||||||
|
|
||||||
# Dump file
|
|
||||||
*.stackdump
|
|
||||||
|
|
||||||
# Folder config file
|
|
||||||
[Dd]esktop.ini
|
|
||||||
|
|
||||||
# Recycle Bin used on file shares
|
|
||||||
$RECYCLE.BIN/
|
|
||||||
|
|
||||||
# Windows Installer files
|
|
||||||
*.cab
|
|
||||||
*.msi
|
|
||||||
*.msix
|
|
||||||
*.msm
|
|
||||||
*.msp
|
|
||||||
|
|
||||||
# Windows shortcuts
|
|
||||||
*.lnk
|
|
||||||
|
|
||||||
# End of https://www.gitignore.io/api/c,c++,ninja,macos,linux,cmake,windows,visualstudiocode
|
|
||||||
|
|
||||||
build
|
|
@ -1,56 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.14)
|
|
||||||
|
|
||||||
project("PROJECTNAME"
|
|
||||||
VERSION 0.1
|
|
||||||
DESCRIPTION "Description of PROJECTNAME"
|
|
||||||
HOMEPAGE_URL "https://labs.phundrak.fr/phundrak/PROJECTNAME"
|
|
||||||
LANGUAGES CXX)
|
|
||||||
|
|
||||||
set(CMAKE_CXX_COMPILER /usr/bin/clang++)
|
|
||||||
file(GLOB SRC_FILES "src/*.cc")
|
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
|
|
||||||
|
|
||||||
include(functions)
|
|
||||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
|
||||||
conan_basic_setup()
|
|
||||||
|
|
||||||
enable_cxx_compiler_flag_if_supported("-Wall")
|
|
||||||
enable_cxx_compiler_flag_if_supported("-pedantic")
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
||||||
enable_cxx_compiler_flag_if_supported("-g")
|
|
||||||
else()
|
|
||||||
enable_cxx_compiler_flag_if_supported("-O3")
|
|
||||||
enable_cxx_compiler_flag_if_supported("-flto")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# include_directories(<PUBLIC HEADER DIRECTORIES>)
|
|
||||||
|
|
||||||
# Main software
|
|
||||||
set(TGT PROJECTNAME)
|
|
||||||
add_executable(${TGT} ${SRC_FILES})
|
|
||||||
target_compile_features(${TGT} PRIVATE cxx_std_17)
|
|
||||||
target_include_directories(${TGT} PRIVATE include/PROJECTNAME)
|
|
||||||
target_link_libraries(${TGT} ${CONAN_LIBS})
|
|
||||||
|
|
||||||
# Tests, -DTESTS=True to activate
|
|
||||||
if(TESTS)
|
|
||||||
set(TESTTGT PROJECTNAME-tests)
|
|
||||||
file(GLOB TEST_FILES "tests/tests.cc")
|
|
||||||
add_executable(${TESTTGT} ${TEST_FILES})
|
|
||||||
target_compile_features(${TESTTGT} PRIVATE cxx_std_17)
|
|
||||||
target_include_directories(${TESTTGT} PRIVATE include/PROJECTNAME)
|
|
||||||
target_link_libraries(${TESTTGT} ${CONAN_LIBS})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# OS specific instructions.
|
|
||||||
if(APPLE)
|
|
||||||
elseif(WIN32)
|
|
||||||
# Windows developer environment specific instructions.
|
|
||||||
if(MINGW)
|
|
||||||
elseif(MSYS)
|
|
||||||
elseif(CYGWIN)
|
|
||||||
endif()
|
|
||||||
elseif(UNIX)
|
|
||||||
else()
|
|
||||||
endif()
|
|
@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2019 Jinsoo Heo
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
@ -1,60 +0,0 @@
|
|||||||
[[http://spacemacs.org][file:https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg]]
|
|
||||||
|
|
||||||
* PROJECTNAME
|
|
||||||
|
|
||||||
PROJECTNAME is a C++17 project written for and built with CMake and Ninja.
|
|
||||||
|
|
||||||
* How to build PROJECTNAME
|
|
||||||
|
|
||||||
You will ned to have Ninja and Conan installed. To install Ninja, install the
|
|
||||||
appropriate package offered by your package manager (~ninja-build~ on Debian,
|
|
||||||
~ninja~ on Arch Linux and Void Linux), and to install conan, use ~pip~.
|
|
||||||
#+begin_src shell
|
|
||||||
pip install --user conan
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
This project is built with conan, ninja and cmake using clang-7 for C++17. To
|
|
||||||
use it, first install clang-7 and lldb 7, then run this:
|
|
||||||
#+begin_src shell
|
|
||||||
conan profile new default --detect
|
|
||||||
conan profile update settings.compiler=clang default
|
|
||||||
conan profile update settings.compiler.version=7.0 default
|
|
||||||
conan profile update settings.compiler.libcxx=libstdc++11 default
|
|
||||||
conan profile update env.CC=/bin/clang default
|
|
||||||
conan profile update env.CXX=/bin/clang++ default
|
|
||||||
#+end_src
|
|
||||||
If you do not wish to overwrite your ~default~ profile, you can instead create a
|
|
||||||
new one, for instance ~clang~. To do so, write the name of your new profile (in
|
|
||||||
this example ~clang~) instead of ~default~ in the commands shown above.
|
|
||||||
|
|
||||||
Then, To build and run the program, go to the root of the project and run this:
|
|
||||||
#+begin_src shell
|
|
||||||
mkdir build && cd build
|
|
||||||
conan install .. --build missing
|
|
||||||
cmake -DCMAKE_CXX_COMPILER=clang++ .. -G Ninja
|
|
||||||
cmake --build .
|
|
||||||
#+end_src
|
|
||||||
If you want to use another profile than your default one, you should run the
|
|
||||||
following line instead of the second line:
|
|
||||||
#+begin_src shell
|
|
||||||
conan install .. --build missing --profile <your_profile>
|
|
||||||
#+end_src
|
|
||||||
If you wish to build the project’s tests in addition to the project itself, you
|
|
||||||
can add the option ~-DTESTS=True~ to the first ~cmake~ command to build the
|
|
||||||
project’s tests too.
|
|
||||||
#+begin_src shell
|
|
||||||
cmake -DCMAKE_CXX_COMPILER=clang++ -DTESTS=True .. -G Ninja
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
If you do not wish to build your project with Ninja but with another generator,
|
|
||||||
such as Unix Makefiles, simply replace ~Ninja~ in the second to last ~cmake~
|
|
||||||
command with the name of your generator. For instance:
|
|
||||||
#+begin_src shell
|
|
||||||
cmake -DCMAKE_CXX_COMPILER=clang++ .. -G "Unix Makefiles"
|
|
||||||
#+end_src
|
|
||||||
You can still build your project by running ~cmake --build .~ or by running
|
|
||||||
~make~ manually.
|
|
||||||
|
|
||||||
* Credits
|
|
||||||
|
|
||||||
Awesome C++ Template by [[https://github.com/devkoriel/AwesomeCppTemplate][devkoriel]].
|
|
@ -1,12 +0,0 @@
|
|||||||
INCLUDE(CheckCXXCompilerFlag)
|
|
||||||
|
|
||||||
function(enable_cxx_compiler_flag_if_supported flag)
|
|
||||||
string(FIND "${CMAKE_CXX_FLAGS}" "${flag}" flag_already_set)
|
|
||||||
if(flag_already_set EQUAL -1)
|
|
||||||
check_cxx_compiler_flag("${flag}" flag_supported)
|
|
||||||
if(flag_supported)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}" PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
unset(flag_supported CACHE)
|
|
||||||
endif()
|
|
||||||
endfunction()
|
|
@ -1,16 +0,0 @@
|
|||||||
from conans import ConanFile, CMake
|
|
||||||
|
|
||||||
|
|
||||||
class PROJECTNAMEConan(ConanFile):
|
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
|
||||||
requires = "gtest/1.8.1@bincrafters/stable"
|
|
||||||
generators = "cmake", "gcc", "txt"
|
|
||||||
|
|
||||||
def imports(self):
|
|
||||||
self.copy("*.dll", dst="bin", src="bin") # From bin to bin
|
|
||||||
self.copy("*.dylib*", dst="bin", src="lib") # From lib to bin
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +0,0 @@
|
|||||||
#include <iostream>
|
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
|
||||||
std::cout << "Hello World!" << std::endl;
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
#include "Poco/MD5Engine.h"
|
|
||||||
#include "Poco/DigestStream.h"
|
|
||||||
|
|
||||||
#include "class.hpp"
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
|
||||||
{
|
|
||||||
Poco::MD5Engine md5;
|
|
||||||
Poco::DigestOutputStream ds(md5);
|
|
||||||
ds << "abcdefghijklmnopqrstuvwxyz";
|
|
||||||
ds.close();
|
|
||||||
std::cout << Poco::DigestEngine::digestToHex(md5.digest()) << std::endl;
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
#include <gtest/gtest.h>
|
|
||||||
|
|
||||||
TEST(SquareRootTest, PositiveNos) {
|
|
||||||
ASSERT_EQ(6, 2 * 3);
|
|
||||||
ASSERT_EQ(6, -2 * -3);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST(SquareRootTest, NegativeNos) {
|
|
||||||
ASSERT_EQ(-6, -2 * 3);
|
|
||||||
ASSERT_EQ(-6, 2 * -3);
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
|
||||||
testing::InitGoogleTest(&argc, argv);
|
|
||||||
return RUN_ALL_TESTS();
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "cnew" "" "" "" ""
|
|
||||||
.hy
|
|
||||||
.SH NAME
|
|
||||||
.PP
|
|
||||||
\f[B]cnew\f[R] \- New C11 Project
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.PP
|
|
||||||
cnew PROJECT
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.PP
|
|
||||||
Creates a new C11 CMake\-based project named PROJECT.
|
|
||||||
.SH REPORTING BUGS
|
|
||||||
.PP
|
|
||||||
Git repository available at
|
|
||||||
<https://labs.phundrak.fr/phundrak/dotfiles>.
|
|
||||||
.SH Copyright
|
|
||||||
.PP
|
|
||||||
Copyright Lucien \[dq]Phundrak\[dq] Cartier Tilet 2019\-2020.
|
|
||||||
Licence GPLv3+: GNU GPL version 3 or later
|
|
||||||
<https://gnu.org/licenses/gpl.html>.
|
|
||||||
This is free software: you are free to change and redistribute it.
|
|
||||||
There is NO WARRANTY, to the extent permitted by law.
|
|
||||||
.SH AUTHORS
|
|
||||||
Lucien \[dq]Phundrak\[dq] Cartier Tilet.
|
|
@ -1,16 +0,0 @@
|
|||||||
#+TITLE: cnew
|
|
||||||
#+AUTHOR: Lucien "Phundrak" Cartier Tilet
|
|
||||||
* NAME
|
|
||||||
*{{{title}}}* - New C11 Project
|
|
||||||
|
|
||||||
* SYNOPSIS
|
|
||||||
{{{title}}} PROJECT
|
|
||||||
|
|
||||||
* DESCRIPTION
|
|
||||||
Creates a new C11 CMake-based project named PROJECT.
|
|
||||||
|
|
||||||
* REPORTING BUGS
|
|
||||||
Git repository available at [[https://labs.phundrak.fr/phundrak/dotfiles]].
|
|
||||||
|
|
||||||
* Copyright
|
|
||||||
Copyright {{{author}}} 2019-2020. Licence GPLv3+: GNU GPL version 3 or later [[https://gnu.org/licenses/gpl.html]]. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
|
|
@ -1,30 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "cppnew" "" "" "" ""
|
|
||||||
.hy
|
|
||||||
.SH NAME
|
|
||||||
.PP
|
|
||||||
\f[B]cppnew\f[R] \- New C++17 Project
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.PP
|
|
||||||
cppnew [\-c, \[en]connan] PROJECT
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.PP
|
|
||||||
Creates a new C++17 project named PROJECT, either CMake\-based only or
|
|
||||||
CMake and Conan\-based.
|
|
||||||
.TP
|
|
||||||
.B \f[C]\-c\f[R], \f[C]\-\-connan\f[R]
|
|
||||||
Creates a Conan\-based project
|
|
||||||
.SH REPORTING BUGS
|
|
||||||
.PP
|
|
||||||
Git repository available at
|
|
||||||
<https://labs.phundrak.fr/phundrak/dotfiles>.
|
|
||||||
.SH Copyright
|
|
||||||
.PP
|
|
||||||
Copyright Lucien \[dq]Phundrak\[dq] Cartier Tilet 2019\-2020.
|
|
||||||
Licence GPLv3+: GNU GPL version 3 or later
|
|
||||||
<https://gnu.org/licenses/gpl.html>.
|
|
||||||
This is free software: you are free to change and redistribute it.
|
|
||||||
There is NO WARRANTY, to the extent permitted by law.
|
|
||||||
.SH AUTHORS
|
|
||||||
Lucien \[dq]Phundrak\[dq] Cartier Tilet.
|
|
@ -1,18 +0,0 @@
|
|||||||
#+TITLE: cppnew
|
|
||||||
#+AUTHOR: Lucien "Phundrak" Cartier Tilet
|
|
||||||
* NAME
|
|
||||||
*{{{title}}}* - New C++17 Project
|
|
||||||
|
|
||||||
* SYNOPSIS
|
|
||||||
{{{title}}} [-c, --connan] PROJECT
|
|
||||||
|
|
||||||
* DESCRIPTION
|
|
||||||
Creates a new C++17 project named PROJECT, either CMake-based only or CMake and Conan-based.
|
|
||||||
|
|
||||||
- ~-c~, ~--connan~ :: Creates a Conan-based project
|
|
||||||
|
|
||||||
* REPORTING BUGS
|
|
||||||
Git repository available at [[https://labs.phundrak.fr/phundrak/dotfiles]].
|
|
||||||
|
|
||||||
* Copyright
|
|
||||||
Copyright {{{author}}} 2019-2020. Licence GPLv3+: GNU GPL version 3 or later [[https://gnu.org/licenses/gpl.html]]. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
|
|
@ -1,58 +0,0 @@
|
|||||||
---
|
|
||||||
AlignAfterOpenBracket: Align
|
|
||||||
AlignConsecutiveAssignments: 'true'
|
|
||||||
AlignEscapedNewlines: Left
|
|
||||||
AlignOperands: 'true'
|
|
||||||
AlignTrailingComments: 'true'
|
|
||||||
AllowAllParametersOfDeclarationOnNextLine: 'true'
|
|
||||||
AllowShortBlocksOnASingleLine: 'true'
|
|
||||||
AllowShortCaseLabelsOnASingleLine: 'true'
|
|
||||||
AllowShortFunctionsOnASingleLine: Empty
|
|
||||||
AllowShortIfStatementsOnASingleLine: 'false'
|
|
||||||
AllowShortLoopsOnASingleLine: 'false'
|
|
||||||
AlwaysBreakAfterReturnType: None
|
|
||||||
AlwaysBreakBeforeMultilineStrings: 'false'
|
|
||||||
AlwaysBreakTemplateDeclarations: 'true'
|
|
||||||
BinPackArguments: 'true'
|
|
||||||
BinPackParameters: 'true'
|
|
||||||
BreakAfterJavaFieldAnnotations: 'true'
|
|
||||||
BreakBeforeBinaryOperators: All
|
|
||||||
BreakBeforeBraces: Linux
|
|
||||||
BreakBeforeInheritanceComma: 'false'
|
|
||||||
BreakBeforeTernaryOperators: 'true'
|
|
||||||
BreakConstructorInitializers: BeforeColon
|
|
||||||
BreakStringLiterals: 'true'
|
|
||||||
ColumnLimit: '80'
|
|
||||||
CompactNamespaces: 'false'
|
|
||||||
ConstructorInitializerAllOnOneLineOrOnePerLine: 'false'
|
|
||||||
Cpp11BracedListStyle: 'true'
|
|
||||||
FixNamespaceComments: 'true'
|
|
||||||
IncludeBlocks: Regroup
|
|
||||||
IndentCaseLabels: 'false'
|
|
||||||
IndentPPDirectives: AfterHash
|
|
||||||
IndentWrappedFunctionNames: 'false'
|
|
||||||
JavaScriptQuotes: Leave
|
|
||||||
JavaScriptWrapImports: 'true'
|
|
||||||
KeepEmptyLinesAtTheStartOfBlocks: 'false'
|
|
||||||
Language: Cpp
|
|
||||||
MaxEmptyLinesToKeep: '1'
|
|
||||||
NamespaceIndentation: Inner
|
|
||||||
PointerAlignment: Right
|
|
||||||
ReflowComments: 'true'
|
|
||||||
SortIncludes: 'true'
|
|
||||||
SortUsingDeclarations: 'true'
|
|
||||||
SpaceAfterCStyleCast: 'false'
|
|
||||||
SpaceAfterTemplateKeyword: 'false'
|
|
||||||
SpaceBeforeAssignmentOperators: 'true'
|
|
||||||
SpaceBeforeParens: ControlStatements
|
|
||||||
SpaceInEmptyParentheses: 'false'
|
|
||||||
SpacesBeforeTrailingComments: '2'
|
|
||||||
SpacesInAngles: 'false'
|
|
||||||
SpacesInCStyleCastParentheses: 'false'
|
|
||||||
SpacesInContainerLiterals: 'false'
|
|
||||||
SpacesInParentheses: 'false'
|
|
||||||
SpacesInSquareBrackets: 'false'
|
|
||||||
Standard: Cpp11
|
|
||||||
UseTab: ForIndentation
|
|
||||||
|
|
||||||
...
|
|
4
dev/templateC++/.gitignore
vendored
4
dev/templateC++/.gitignore
vendored
@ -1,4 +0,0 @@
|
|||||||
bin
|
|
||||||
build
|
|
||||||
debug
|
|
||||||
!.gitignore
|
|
@ -1,26 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
|
|
||||||
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
|
|
||||||
|
|
||||||
project("PROJECTNAME")
|
|
||||||
|
|
||||||
set(TGT "PROJECTNAME")
|
|
||||||
set(${TGT}_VERSION_MAJOR 0)
|
|
||||||
set(${TGT}_VERSION_MINOR 1)
|
|
||||||
|
|
||||||
set(CXX_COVERAGE_COMPILE_FLAGS "-pedantic -Wall -Wextra -Wold-style-cast -Woverloaded-virtual -Wfloat-equal -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -Wsign-conversion -Wshadow -Weffc++ -Wredundant-decls -Wdouble-promotion -Winit-self -Wswitch-default -Wswitch-enum -Wundef -Winline -Wunused -Wnon-virtual-dtor")
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CXX_COVERAGE_COMPILE_FLAGS} -DDebug -g -pg")
|
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CXX_COVERAGE_COMPILE_FLAGS} -O3 -flto")
|
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
||||||
|
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "../bin/")
|
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "../debug/")
|
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_COVERAGE_COMPILE_FLAGS}")
|
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CXX_COVERAGE_COMPILE_FLAGS}")
|
|
||||||
|
|
||||||
include_directories(include)
|
|
||||||
file(GLOB SOURCES "src/*.cc")
|
|
||||||
add_executable(${TGT} ${SOURCES})
|
|
@ -1,12 +0,0 @@
|
|||||||
release:
|
|
||||||
@mkdir -p build bin
|
|
||||||
@cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make
|
|
||||||
|
|
||||||
debug:
|
|
||||||
@mkdir -p build debug
|
|
||||||
@cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@rm -rf bin
|
|
||||||
@rm -rf build
|
|
||||||
@rm -rf debug
|
|
@ -1,14 +0,0 @@
|
|||||||
[[http://spacemacs.org][file:https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg]]
|
|
||||||
|
|
||||||
* PROJECTNAME
|
|
||||||
|
|
||||||
PROJECTNAME is a C++17 project written for and built with CMake.
|
|
||||||
|
|
||||||
* How to build PROJECTNAME
|
|
||||||
|
|
||||||
You can directly run either ~make~ or ~make release~ to compile the release
|
|
||||||
version of the binaries which will be generated in ~bin/~. If you wish to
|
|
||||||
compile its debug version instead, run ~make debug~ to generate the binaries in
|
|
||||||
the ~debug/~ directory. Once you have ran ~make~ at the root of the project, you
|
|
||||||
can recompile the project from the ~build/~ directory if you wish to avoid to
|
|
||||||
re-run CMake.
|
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +0,0 @@
|
|||||||
#include <iostream>
|
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
|
||||||
std::cout << "Hello World!" << std::endl;
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,58 +0,0 @@
|
|||||||
---
|
|
||||||
AlignAfterOpenBracket: Align
|
|
||||||
AlignConsecutiveAssignments: 'true'
|
|
||||||
AlignEscapedNewlines: Left
|
|
||||||
AlignOperands: 'true'
|
|
||||||
AlignTrailingComments: 'true'
|
|
||||||
AllowAllParametersOfDeclarationOnNextLine: 'true'
|
|
||||||
AllowShortBlocksOnASingleLine: 'true'
|
|
||||||
AllowShortCaseLabelsOnASingleLine: 'true'
|
|
||||||
AllowShortFunctionsOnASingleLine: Empty
|
|
||||||
AllowShortIfStatementsOnASingleLine: 'false'
|
|
||||||
AllowShortLoopsOnASingleLine: 'false'
|
|
||||||
AlwaysBreakAfterReturnType: None
|
|
||||||
AlwaysBreakBeforeMultilineStrings: 'false'
|
|
||||||
AlwaysBreakTemplateDeclarations: 'true'
|
|
||||||
BinPackArguments: 'true'
|
|
||||||
BinPackParameters: 'true'
|
|
||||||
BreakAfterJavaFieldAnnotations: 'true'
|
|
||||||
BreakBeforeBinaryOperators: All
|
|
||||||
BreakBeforeBraces: Linux
|
|
||||||
BreakBeforeInheritanceComma: 'false'
|
|
||||||
BreakBeforeTernaryOperators: 'true'
|
|
||||||
BreakConstructorInitializers: BeforeColon
|
|
||||||
BreakStringLiterals: 'true'
|
|
||||||
ColumnLimit: '80'
|
|
||||||
CompactNamespaces: 'false'
|
|
||||||
ConstructorInitializerAllOnOneLineOrOnePerLine: 'false'
|
|
||||||
Cpp11BracedListStyle: 'true'
|
|
||||||
FixNamespaceComments: 'true'
|
|
||||||
IncludeBlocks: Regroup
|
|
||||||
IndentCaseLabels: 'false'
|
|
||||||
IndentPPDirectives: AfterHash
|
|
||||||
IndentWrappedFunctionNames: 'false'
|
|
||||||
JavaScriptQuotes: Leave
|
|
||||||
JavaScriptWrapImports: 'true'
|
|
||||||
KeepEmptyLinesAtTheStartOfBlocks: 'false'
|
|
||||||
Language: Cpp
|
|
||||||
MaxEmptyLinesToKeep: '1'
|
|
||||||
NamespaceIndentation: Inner
|
|
||||||
PointerAlignment: Right
|
|
||||||
ReflowComments: 'true'
|
|
||||||
SortIncludes: 'true'
|
|
||||||
SortUsingDeclarations: 'true'
|
|
||||||
SpaceAfterCStyleCast: 'false'
|
|
||||||
SpaceAfterTemplateKeyword: 'false'
|
|
||||||
SpaceBeforeAssignmentOperators: 'true'
|
|
||||||
SpaceBeforeParens: ControlStatements
|
|
||||||
SpaceInEmptyParentheses: 'false'
|
|
||||||
SpacesBeforeTrailingComments: '2'
|
|
||||||
SpacesInAngles: 'false'
|
|
||||||
SpacesInCStyleCastParentheses: 'false'
|
|
||||||
SpacesInContainerLiterals: 'false'
|
|
||||||
SpacesInParentheses: 'false'
|
|
||||||
SpacesInSquareBrackets: 'false'
|
|
||||||
Standard: Cpp11
|
|
||||||
UseTab: ForIndentation
|
|
||||||
|
|
||||||
...
|
|
4
dev/templateC/.gitignore
vendored
4
dev/templateC/.gitignore
vendored
@ -1,4 +0,0 @@
|
|||||||
bin
|
|
||||||
build
|
|
||||||
debug
|
|
||||||
!.gitignore
|
|
@ -1,74 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.10)
|
|
||||||
|
|
||||||
project("PROJECTNAME"
|
|
||||||
VERSION 0.1
|
|
||||||
DESCRIPTION "Description of PROJECTNAME"
|
|
||||||
HOMEPAGE_URL "https://labs.phundrak.fr/phundrak/PROJECTNAME"
|
|
||||||
LANGUAGES C)
|
|
||||||
|
|
||||||
set(CMAKE_C_COMPILER /usr/bin/clang)
|
|
||||||
file(GLOB SRC_FILES "src/*.c")
|
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
|
|
||||||
include(functions)
|
|
||||||
|
|
||||||
enable_c_compiler_flag_if_supported("-Wall")
|
|
||||||
enable_c_compiler_flag_if_supported("-pedantic")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wextra")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wfloat-equal")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wwrite-strings")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wpointer-arith")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wcast-qual")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wcast-align")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wconversion")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wshadow")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wreduntant-decls")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wdouble-promotion")
|
|
||||||
enable_c_compiler_flag_if_supported("-Winit-self")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wswitch-default")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wswitch-enum")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wundef")
|
|
||||||
enable_c_compiler_flag_if_supported("-Winline")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wpedantic")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wsign-conversion")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wnull-dereference")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wuseless-cast")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wformat=2")
|
|
||||||
enable_c_compiler_flag_if_supported("-Wlifetime")
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
||||||
enable_c_compiler_flag_if_supported("-g")
|
|
||||||
else()
|
|
||||||
enable_c_compiler_flag_if_supported("-O3")
|
|
||||||
enable_c_compiler_flag_if_supported("-flto")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# include_directories(<PUBLIC HEADER DIRECTORIES>)
|
|
||||||
|
|
||||||
# Main software
|
|
||||||
set(TGT PROJECTNAME)
|
|
||||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build/bin)
|
|
||||||
add_executable(${TGT} ${SRC_FILES})
|
|
||||||
target_compile_features(${TGT} PRIVATE c_std_11)
|
|
||||||
target_include_directories(${TGT} PRIVATE include/PROJECTNAME)
|
|
||||||
#target_link_libraries(${TGT})
|
|
||||||
|
|
||||||
# Tests, -DTESTS=True to activate
|
|
||||||
if(TESTS)
|
|
||||||
set(TESTTGT PROJECTNAME-tests)
|
|
||||||
file(GLOB TEST_FILES "tests/tests.c")
|
|
||||||
add_executable(${TESTTGT} ${TEST_FILES})
|
|
||||||
set_property(TARGET ${TESTTGT} PROPERTY C_STANDARD 11)
|
|
||||||
target_include_directories(${TESTTGT} PRIVATE include/PROJECTNAME)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# OS specific instructions.
|
|
||||||
if(APPLE)
|
|
||||||
elseif(WIN32)
|
|
||||||
# Windows developer environment specific instructions.
|
|
||||||
if(MINGW)
|
|
||||||
elseif(MSYS)
|
|
||||||
elseif(CYGWIN)
|
|
||||||
endif()
|
|
||||||
elseif(UNIX)
|
|
||||||
else()
|
|
||||||
endif()
|
|
@ -1,12 +0,0 @@
|
|||||||
release:
|
|
||||||
@mkdir -p build bin
|
|
||||||
@cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make
|
|
||||||
|
|
||||||
debug:
|
|
||||||
@mkdir -p build debug
|
|
||||||
@cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@rm -rf bin
|
|
||||||
@rm -rf build
|
|
||||||
@rm -rf debug
|
|
@ -1,14 +0,0 @@
|
|||||||
[[http://spacemacs.org][file:https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg]]
|
|
||||||
|
|
||||||
* PROJECTNAME
|
|
||||||
|
|
||||||
PROJECTNAME is a C11 project written for and built with CMake.
|
|
||||||
|
|
||||||
* How to build PROJECTNAME
|
|
||||||
|
|
||||||
You can directly run either ~make~ or ~make release~ to compile the release
|
|
||||||
version of the binaries which will be generated in ~bin/~. If you wish to
|
|
||||||
compile its debug version instead, run ~make debug~ to generate the binaries in
|
|
||||||
the ~debug/~ directory. Once you have ran ~make~ at the root of the project, you
|
|
||||||
can recompile the project from the ~build/~ directory if you wish to avoid to
|
|
||||||
re-run CMake.
|
|
@ -1,12 +0,0 @@
|
|||||||
INCLUDE(CheckCCompilerFlag)
|
|
||||||
|
|
||||||
function(enable_c_compiler_flag_if_supported flag)
|
|
||||||
string(FIND "${CMAKE_C_FLAGS}" "${flag}" flag_already_set)
|
|
||||||
if(flag_already_set EQUAL -1)
|
|
||||||
check_c_compiler_flag("${flag}" flag_supported)
|
|
||||||
if(flag_supported)
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}" PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
unset(flag_supported CACHE)
|
|
||||||
endif()
|
|
||||||
endfunction()
|
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
|
||||||
printf("Hello World!\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user