Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Commit f3d3d49

Browse files
committed
Moved from KFR repository
1 parent fe12876 commit f3d3d49

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+21469
-0
lines changed

.clang-format

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
UseTab: Never
2+
IndentWidth: 4
3+
Language : Cpp
4+
BreakBeforeBraces: Allman
5+
MaxEmptyLinesToKeep: 1
6+
IndentCaseLabels: false
7+
NamespaceIndentation: None
8+
AccessModifierOffset: -4
9+
SpacesInParentheses: false
10+
SpaceInEmptyParentheses: false
11+
SpacesInCStyleCastParentheses: false
12+
PointerAlignment: Left
13+
Cpp11BracedListStyle: false
14+
AllowShortIfStatementsOnASingleLine: false
15+
AllowShortFunctionsOnASingleLine : true
16+
AlignOperands: true
17+
Standard: Cpp11
18+
IndentCaseLabels: false
19+
AlignTrailingComments : false
20+
ConstructorInitializerAllOnOneLineOrOnePerLine : false
21+
ColumnLimit: 110
22+
BinPackParameters : true
23+
BinPackArguments : true
24+
AlwaysBreakTemplateDeclarations : true
25+
AlignConsecutiveAssignments : true
26+
PenaltyReturnTypeOnItsOwnLine: 50000
27+
CommentPragmas: '^ >>>'

.gitignore

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Compiled Object files
2+
*.slo
3+
*.lo
4+
*.o
5+
*.obj
6+
7+
# Precompiled Headers
8+
*.gch
9+
*.pch
10+
11+
# Compiled Dynamic libraries
12+
*.so
13+
*.dylib
14+
*.dll
15+
16+
# Fortran module files
17+
*.mod
18+
*.smod
19+
20+
# Compiled Static libraries
21+
*.lai
22+
*.la
23+
*.a
24+
*.lib
25+
26+
# Executables
27+
*.exe
28+
*.out
29+
*.app
30+
31+
# CMake files
32+
CMakeCache.txt
33+
CMakeFiles
34+
CMakeScripts
35+
Makefile
36+
cmake_install.cmake
37+
install_manifest.txt
38+
CTestTestfile.cmake
39+
40+
# build directory
41+
build/
42+
43+
# test directory
44+
svg/
45+
46+
# Byte-compiled / optimized / DLL files
47+
__pycache__/
48+
*.py[cod]
49+
*$py.class
50+
51+
# Distribution / packaging
52+
.Python
53+
env/
54+
build/
55+
develop-eggs/
56+
dist/
57+
downloads/
58+
eggs/
59+
.eggs/
60+
lib/
61+
lib64/
62+
parts/
63+
sdist/
64+
var/
65+
*.egg-info/
66+
.installed.cfg
67+
*.egg
68+
69+
# Sphinx documentation
70+
docs/_build/
71+
72+
# CLion
73+
.idea/

.travis.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
sudo: required
2+
dist: precise
3+
language: cpp
4+
5+
matrix:
6+
include:
7+
- compiler: clang
8+
addons:
9+
apt:
10+
sources:
11+
- ubuntu-toolchain-r-test
12+
- llvm-toolchain-precise-3.8
13+
- george-edison55-precise-backports
14+
packages:
15+
- cmake
16+
- cmake-data
17+
- g++-5
18+
- clang-3.8
19+
env:
20+
- CXXCOMPILER=clang++-3.8 CCOMPILER=clang-3.8
21+
22+
before_install:
23+
- sudo apt-get update -qq
24+
script:
25+
- mkdir build
26+
- cd build
27+
- cmake -DCMAKE_CXX_COMPILER=$CXXCOMPILER -DCMAKE_C_COMPILER=$CCOMPILER -DCMAKE_BUILD_TYPE=Release .. && make
28+
- cd tests
29+
- ctest

CMakeLists.txt

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Copyright (C) 2016 D Levin (http://www.kfrlib.com)
2+
# This file is part of KFR
3+
#
4+
# KFR is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation, either version 3 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# KFR is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License
15+
# along with KFR.
16+
17+
18+
cmake_minimum_required(VERSION 3.0)
19+
20+
set(OPT_BITNESS "") # cmake -DOPT_BITNESS="-m32" or -m64
21+
set(OPT_STATIC "") # cmake -DOPT_STATIC="-static"
22+
23+
if (CMAKE_BUILD_TYPE_INITIALIZED_TO_DEFAULT)
24+
set(CMAKE_BUILD_TYPE Release)
25+
endif ()
26+
if (${CMAKE_GENERATOR} STREQUAL "MinGW Makefiles" OR ${CMAKE_GENERATOR} STREQUAL "MSYS Makefiles")
27+
set(OPT_TARGET "--target=x86_64-w64-windows-gnu")
28+
set(CMAKE_CXX_COMPILER clang++)
29+
set(CMAKE_C_COMPILER clang)
30+
else ()
31+
set(OPT_TARGET "") # default target
32+
endif ()
33+
set(CMAKE_CXX_FLAGS "${OPT_TARGET} ${OPT_BITNESS} ${OPT_STATIC}" CACHE STRING "compile flags" FORCE)
34+
set(CMAKE_C_FLAGS "${OPT_TARGET} ${OPT_BITNESS} ${OPT_STATIC}" CACHE STRING "compile flags" FORCE)
35+
set(CMAKE_EXE_LINKER_FLAGS "${OPT_TARGET} ${OPT_BITNESS}")
36+
set(CMAKE_SHARED_LINKER_FLAGS "${OPT_TARGET} ${OPT_BITNESS}")
37+
set(CMAKE_STATIC_LINKER_FLAGS "${OPT_TARGET} ${OPT_BITNESS}")
38+
39+
project(kfr)
40+
41+
include(sources.cmake)
42+
43+
add_compile_options(-std=c++1y)
44+
45+
set(ALL_WARNINGS -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c99-extensions -Wno-padded)
46+
47+
add_compile_options(-march=native)
48+
49+
add_subdirectory(tests)
50+

0 commit comments

Comments
 (0)