Skip to content

Commit 3a9dec9

Browse files
committed
first
1 parent 1bf251a commit 3a9dec9

File tree

612 files changed

+147294
-1
lines changed

Some content is hidden

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

612 files changed

+147294
-1
lines changed

CMakeLists.txt

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
cmake_minimum_required(VERSION 2.8.7)
2+
if(POLICY CMP0046)
3+
cmake_policy(SET CMP0046 NEW)
4+
endif()
5+
if(POLICY CMP0054)
6+
cmake_policy(SET CMP0054 NEW)
7+
endif()
8+
9+
# ---[ Caffe project
10+
project(Caffe C CXX)
11+
12+
# ---[ Caffe version
13+
set(CAFFE_TARGET_VERSION "1.0.0-rc3" CACHE STRING "Caffe logical version")
14+
set(CAFFE_TARGET_SOVERSION "1.0.0-rc3" CACHE STRING "Caffe soname version")
15+
add_definitions(-DCAFFE_VERSION=${CAFFE_TARGET_VERSION})
16+
17+
# ---[ Using cmake scripts and modules
18+
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
19+
20+
include(ExternalProject)
21+
22+
include(cmake/Utils.cmake)
23+
include(cmake/Targets.cmake)
24+
include(cmake/Misc.cmake)
25+
include(cmake/Summary.cmake)
26+
include(cmake/ConfigGen.cmake)
27+
28+
# ---[ Options
29+
caffe_option(CPU_ONLY "Build Caffe without CUDA support" OFF) # TODO: rename to USE_CUDA
30+
caffe_option(USE_CUDNN "Build Caffe with cuDNN library support" ON IF NOT CPU_ONLY)
31+
caffe_option(BUILD_SHARED_LIBS "Build shared libraries" ON)
32+
caffe_option(BUILD_python "Build Python wrapper" ON)
33+
set(python_version "2" CACHE STRING "Specify which Python version to use")
34+
caffe_option(BUILD_matlab "Build Matlab wrapper" OFF IF UNIX OR APPLE)
35+
caffe_option(BUILD_docs "Build documentation" ON IF UNIX OR APPLE)
36+
caffe_option(BUILD_python_layer "Build the Caffe Python layer" ON)
37+
caffe_option(USE_OPENCV "Build with OpenCV support" ON)
38+
caffe_option(USE_LEVELDB "Build with levelDB" ON)
39+
caffe_option(USE_LMDB "Build with lmdb" ON)
40+
caffe_option(ALLOW_LMDB_NOLOCK "Allow MDB_NOLOCK when reading LMDB files (only if necessary)" OFF)
41+
42+
# ---[ Dependencies
43+
include(cmake/Dependencies.cmake)
44+
45+
# ---[ Flags
46+
if(UNIX OR APPLE)
47+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall")
48+
endif()
49+
50+
caffe_set_caffe_link()
51+
52+
if(USE_libstdcpp)
53+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++")
54+
message("-- Warning: forcing libstdc++ (controlled by USE_libstdcpp option in cmake)")
55+
endif()
56+
57+
add_definitions(-DGTEST_USE_OWN_TR1_TUPLE)
58+
59+
# ---[ Warnings
60+
caffe_warnings_disable(CMAKE_CXX_FLAGS -Wno-sign-compare -Wno-uninitialized)
61+
62+
# ---[ Config generation
63+
configure_file(cmake/Templates/caffe_config.h.in "${PROJECT_BINARY_DIR}/caffe_config.h")
64+
65+
# ---[ Includes
66+
set(Caffe_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
67+
include_directories(${Caffe_INCLUDE_DIR} ${PROJECT_BINARY_DIR})
68+
include_directories(BEFORE src) # This is needed for gtest.
69+
70+
# ---[ Subdirectories
71+
add_subdirectory(src/gtest)
72+
add_subdirectory(src/caffe)
73+
add_subdirectory(tools)
74+
add_subdirectory(examples)
75+
add_subdirectory(python)
76+
add_subdirectory(matlab)
77+
add_subdirectory(docs)
78+
79+
# ---[ Linter target
80+
add_custom_target(lint COMMAND ${CMAKE_COMMAND} -P ${PROJECT_SOURCE_DIR}/cmake/lint.cmake)
81+
82+
# ---[ pytest target
83+
if(BUILD_python)
84+
add_custom_target(pytest COMMAND python${python_version} -m unittest discover -s caffe/test WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/python )
85+
add_dependencies(pytest pycaffe)
86+
endif()
87+
88+
# ---[ Configuration summary
89+
caffe_print_configuration_summary()
90+
91+
# ---[ Export configs generation
92+
caffe_generate_export_configs()

CONTRIBUTING.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contributing
2+
3+
## Issues
4+
5+
Specific Caffe design and development issues, bugs, and feature requests are maintained by GitHub Issues.
6+
7+
_Please do not post usage, installation, or modeling questions, or other requests for help to Issues._
8+
Use the [caffe-users list](https://groups.google.com/forum/#!forum/caffe-users) instead. This helps developers maintain a clear, uncluttered, and efficient view of the state of Caffe.
9+
10+
When reporting a bug, it's most helpful to provide the following information, where applicable:
11+
12+
* What steps reproduce the bug?
13+
* Can you reproduce the bug using the latest [master](https://github.com/BVLC/caffe/tree/master), compiled with the `DEBUG` make option?
14+
* What hardware and operating system/distribution are you running?
15+
* If the bug is a crash, provide the backtrace (usually printed by Caffe; always obtainable with `gdb`).
16+
17+
Try to give your issue a title that is succinct and specific. The devs will rename issues as needed to keep track of them.
18+
19+
## Pull Requests
20+
21+
Caffe welcomes all contributions.
22+
23+
See the [contributing guide](http://caffe.berkeleyvision.org/development.html) for details.
24+
25+
Briefly: read commit by commit, a PR should tell a clean, compelling story of _one_ improvement to Caffe. In particular:
26+
27+
* A PR should do one clear thing that obviously improves Caffe, and nothing more. Making many smaller PRs is better than making one large PR; review effort is superlinear in the amount of code involved.
28+
* Similarly, each commit should be a small, atomic change representing one step in development. PRs should be made of many commits where appropriate.
29+
* Please do rewrite PR history to be clean rather than chronological. Within-PR bugfixes, style cleanups, reversions, etc. should be squashed and should not appear in merged PR history.
30+
* Anything nonobvious from the code should be explained in comments, commit messages, or the PR description, as appropriate.

CONTRIBUTORS.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Contributors
2+
3+
Caffe is developed by a core set of BVLC members and the open-source community.
4+
5+
We thank all of our [contributors](https://github.com/BVLC/caffe/graphs/contributors)!
6+
7+
**For the detailed history of contributions** of a given file, try
8+
9+
git blame file
10+
11+
to see line-by-line credits and
12+
13+
git log --follow file
14+
15+
to see the change log even across renames and rewrites.
16+
17+
Please refer to the [acknowledgements](http://caffe.berkeleyvision.org/#acknowledgements) on the Caffe site for further details.
18+
19+
**Copyright** is held by the original contributor according to the versioning history; see LICENSE.

INSTALL.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Installation
2+
3+
See http://caffe.berkeleyvision.org/installation.html for the latest
4+
installation instructions.
5+
6+
Check the users group in case you need help:
7+
https://groups.google.com/forum/#!forum/caffe-users

LICENSE

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
COPYRIGHT
2+
3+
All contributions by the University of California:
4+
Copyright (c) 2014, 2015, The Regents of the University of California (Regents)
5+
All rights reserved.
6+
7+
All other contributions:
8+
Copyright (c) 2014, 2015, the respective contributors
9+
All rights reserved.
10+
11+
Caffe uses a shared copyright model: each contributor holds copyright over
12+
their contributions to Caffe. The project versioning records all such
13+
contribution and copyright details. If a contributor wants to further mark
14+
their specific copyright on a particular contribution, they should indicate
15+
their copyright solely in the commit message of the change when it is
16+
committed.
17+
18+
LICENSE
19+
20+
Redistribution and use in source and binary forms, with or without
21+
modification, are permitted provided that the following conditions are met:
22+
23+
1. Redistributions of source code must retain the above copyright notice, this
24+
list of conditions and the following disclaimer.
25+
2. Redistributions in binary form must reproduce the above copyright notice,
26+
this list of conditions and the following disclaimer in the documentation
27+
and/or other materials provided with the distribution.
28+
29+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
30+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
31+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
32+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
33+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
34+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
36+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
38+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39+
40+
CONTRIBUTION AGREEMENT
41+
42+
By contributing to the BVLC/caffe repository through pull-request, comment,
43+
or otherwise, the contributor releases their content to the
44+
license and copyright terms herein.

0 commit comments

Comments
 (0)