1
0
Fork 0

Merge branch 'solaris' of github.com:arangodb/arangodb into solaris

Conflicts:
	CMakeLists.txt
This commit is contained in:
Frank Celler 2016-02-24 22:41:00 +01:00
commit 8c632cae24
6 changed files with 155 additions and 206 deletions

View File

@ -147,7 +147,7 @@ find_package(PythonInterp 2)
find_package(Go 1.2) find_package(Go 1.2)
if (NOT GO_FOUND) if (NOT GO_FOUND)
message ("Go version >=1.2 not found. etcd will not be built.") message("Go version >=1.2 not found. etcd will not be built.")
endif () endif ()
################################################################################ ################################################################################
@ -385,24 +385,44 @@ endif ()
## BOOST ## BOOST
################################################################################ ################################################################################
option(AR_USE_SYSTEM_LIBS "use libraries provided by the system" OFF) option(USE_BOOST_SYSTEM_LIBS "use libraries provided by the system" OFF)
set(Boost_USE_MULTITHREADED ON) set(Boost_USE_MULTITHREADED ON)
set(BOOST_MINIMUM_VERSION 1.58) set(BOOST_MINIMUM_VERSION 1.58)
set(BOOST_INCLUDE ${PROJECT_SOURCE_DIR}/3rdParty/boost/1.58.0 CACHE path "BOOST include path") if (USE_BOOST_SYSTEM_LIBS)
find(Boost ${BOOST_MINIMUM_VERSION} REQUIRED)
else ()
set(BOOST_INCLUDE ${PROJECT_SOURCE_DIR}/3rdParty/boost/${BOOST_MINIMUM_VERSION}.0 CACHE path "BOOST include path")
set(Boost_INCLUDE_DIR ${BOOST_INCLUDE})
set(Boost_VERSION ${BOOST_MINIMUM_VERSION})
endif ()
set(Boost_INCLUDE_DIR ${BOOST_INCLUDE}) find_package(Boost ${Boost_VERSION} EXACT COMPONENTS unit_test_framework)
find_package(Boost COMPONENTS unit_test_framework)
if (${Boost_UNIT_TEST_FRAMEWORK_FOUND}) if (${Boost_UNIT_TEST_FRAMEWORK_FOUND})
try_compile(
HAVE_USABLE_BOOT_LIBRARIES
"${CMAKE_BINARY_DIR}/temp"
"${CMAKE_SOURCE_DIR}/cmake/test_boost.cpp"
LINK_LIBRARIES
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES=${Boost_INCLUDE_DIR}"
)
if (HAVE_USABLE_BOOT_LIBRARIES)
option(USE_BOOST_UNITTESTS "use boost unit-tests" ON) option(USE_BOOST_UNITTESTS "use boost unit-tests" ON)
else ()
message("cannot use BOOST library ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}")
option(USE_BOOST_UNITTESTS "use boost unit-tests" OFF)
endif ()
else () else ()
option(USE_BOOST_UNITTESTS "use boost unit-tests" OFF) option(USE_BOOST_UNITTESTS "use boost unit-tests" OFF)
endif () endif ()
if (NOT USE_BOOST_UNITTESTS) if (NOT USE_BOOST_UNITTESTS)
message ("BOOST unit tests are disabled") message("BOOST unit tests are disabled")
endif () endif ()
find_package(Boost ${BOOST_MINIMUM_VERSION} REQUIRED) find_package(Boost ${BOOST_MINIMUM_VERSION} REQUIRED)

View File

@ -1,6 +1,7 @@
# -*- mode: CMAKE; -*- # -*- mode: CMAKE; -*-
set(MAN_NAMES if (USE_MAINTAINER_MODE)
set(MAN_NAMES
man1/arangob.1 man1/arangob.1
man1/arangodump.1 man1/arangodump.1
man1/arangoimp.1 man1/arangoimp.1
@ -10,11 +11,11 @@ set(MAN_NAMES
man8/arangod.8 man8/arangod.8
man8/arango-dfdb.8 man8/arango-dfdb.8
man8/foxx-manager.8 man8/foxx-manager.8
) )
set(MAN_FILES) set(MAN_FILES)
foreach (m IN LISTS MAN_NAMES) foreach (m IN LISTS MAN_NAMES)
set(msrc ${CMAKE_SOURCE_DIR}/Documentation/${m}) set(msrc ${CMAKE_SOURCE_DIR}/Documentation/${m})
set(mdst ${CMAKE_SOURCE_DIR}/Documentation/man/${m}) set(mdst ${CMAKE_SOURCE_DIR}/Documentation/man/${m})
@ -33,6 +34,23 @@ foreach (m IN LISTS MAN_NAMES)
) )
list(APPEND MAN_FILES ${mdst}) list(APPEND MAN_FILES ${mdst})
endforeach () endforeach ()
add_custom_target(man ALL DEPENDS ${MAN_FILES}) add_custom_command(
OUTPUT
${CMAKE_SOURCE_DIR}/README
COMMAND
${CMAKE_SOURCE_DIR}/utils/generateREADME.sh ${CMAKE_SOURCE_DIR}/README.md ${CMAKE_SOURCE_DIR}/README
DEPENDS
${CMAKE_SOURCE_DIR}/README.md
WORKING_DIRECTORY
${CMAKE_SOURCE_DIR}
COMMENT
"Building README"
VERBATIM
)
list(APPEND MAN_FILES ${CMAKE_SOURCE_DIR}/README)
add_custom_target(man ALL DEPENDS ${MAN_FILES})
endif ()

View File

@ -18,84 +18,11 @@ warning:
@echo " cmake .. -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++" @echo " cmake .. -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++"
@echo "" @echo ""
-include Makefile
VERSION_MAJOR := $(wordlist 1,1,$(subst ., ,$(VERSION))) VERSION_MAJOR := $(wordlist 1,1,$(subst ., ,$(VERSION)))
VERSION_MINOR := $(wordlist 2,2,$(subst ., ,$(VERSION))) VERSION_MINOR := $(wordlist 2,2,$(subst ., ,$(VERSION)))
VERSION_PATCH := $(wordlist 3,3,$(subst ., ,$(VERSION))) VERSION_PATCH := $(wordlist 3,3,$(subst ., ,$(VERSION)))
VERSION_PATCH := $(wordlist 1,1,$(subst -, ,$(VERSION_PATCH))) VERSION_PATCH := $(wordlist 1,1,$(subst -, ,$(VERSION_PATCH)))
## -----------------------------------------------------------------------------
## --SECTION-- SPECIAL TARGETS
## -----------------------------------------------------------------------------
################################################################################
### @brief setup
################################################################################
.PHONY: setup
setup:
@echo ACLOCAL
@aclocal -I m4
@echo AUTOMAKE
@automake --add-missing --force-missing --copy
@echo AUTOCONF
@autoconf -I m4
@echo auto system configured, proceed with configure
################################################################################
### @brief add maintainer files
################################################################################
MAINTAINER = \
README \
arangod/Aql/tokens.cpp \
arangod/Aql/grammar.cpp \
arangod/Aql/grammar.h \
lib/JsonParser/json-parser.cpp \
lib/V8/v8-json.cpp \
lib/Basics/voc-errors.h \
lib/Basics/voc-errors.cpp \
js/common/bootstrap/errors.js
AUTOMAGIC = \
Makefile.in \
aclocal.m4 \
configure \
config/compile \
config/config.guess \
config/config.sub \
config/depcomp \
config/install-sh \
config/missing
.PHONY: add-maintainer add-automagic
add-maintainer:
@echo adding generated files to GIT
git add -f $(MAINTAINER)
remove-maintainer:
@echo removing generated files from GIT
git rm -f $(MAINTAINER)
add-automagic:
@echo adding automagic files to GIT
git add -f $(AUTOMAGIC)
remove-automagic:
@echo removing automagic files from GIT
git rm -f $(AUTOMAGIC)
################################################################################
### @brief make love
################################################################################
love:
@echo ArangoDB loves you
## ----------------------------------------------------------------------------- ## -----------------------------------------------------------------------------
## --SECTION-- CMAKE & CPACK ## --SECTION-- CMAKE & CPACK
## ----------------------------------------------------------------------------- ## -----------------------------------------------------------------------------
@ -392,36 +319,3 @@ packXX:
cd Build$(BITS) && cpack -G ZIP -D "BUILD_TARGET=RelWithDebInfo" cd Build$(BITS) && cpack -G ZIP -D "BUILD_TARGET=RelWithDebInfo"
./Installation/Windows/installer-generator.sh $(BITS) $(shell pwd) ./Installation/Windows/installer-generator.sh $(BITS) $(shell pwd)
checkcmake:
if test -z "`cmake --help |grep -i visual`"; then \
echo "Your cmake is not sufficient; it lacks support for visual studio." ; \
exit 1; \
fi
################################################################################
### @brief generates a tar archive
################################################################################
.PHONY: pack-tar pack-tar-config
pack-tar-config:
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var
pack-tar:
rm -rf /tmp/pack-arangodb
make install-strip DESTDIR=/tmp/pack-arangodb
tar -c -v -z -f arangodb-$(VERSION).tar.gz -C /tmp/pack-arangodb .
## -----------------------------------------------------------------------------
## --SECTION-- END-OF-FILE
## -----------------------------------------------------------------------------
## Local Variables:
## mode: outline-minor
## outline-regexp: "### @brief\\|## --SECTION--\\|# -\\*-"
## End:

125
README
View File

@ -1,5 +1,4 @@
ArangoDB ****** ArangoDB ******
ArangoDB is a multi-model, open-source database with flexible data models for ArangoDB is a multi-model, open-source database with flexible data models for
documents, graphs, and key-values. Build high performance applications using a documents, graphs, and key-values. Build high performance applications using a
convenient SQL-like query language or JavaScript extensions. Use ACID convenient SQL-like query language or JavaScript extensions. Use ACID
@ -10,19 +9,15 @@ To get started, try one of our 10 minutes tutorials in your favorite
programming language or try one of our ArangoDB_Cookbook_recipes. programming language or try one of our ArangoDB_Cookbook_recipes.
For the impatient: download and install ArangoDB. Start the server arangod and For the impatient: download and install ArangoDB. Start the server arangod and
point your browser to http://127.0.0.1:8529/. point your browser to http://127.0.0.1:8529/.
***** Key Features in ArangoDB *****
Key Features in ArangoDB * Multi-Model: Documents, graphs and key-value pairs — model your data as
you see fit for your application.
* Joins: Conveniently join what belongs together for flexible ad-hoc
* Multi-Model: Documents, graphs and key-value pairs — model your data as you querying, less data redundancy.
see fit for your application. * Transactions: Easy application development keeping your data consistent
* Joins: Conveniently join what belongs together for flexible ad-hoc querying, and safe. No hassle in your client.
less data redundancy.
* Transactions: Easy application development keeping your data consistent and
safe. No hassle in your client.
Here is an AQL query that makes use of all those features: Here is an AQL query that makes use of all those features:
AQL Query Example AQL Query Example [AQL Query Example]
Joins and transactions are key features for flexible, secure data designs, Joins and transactions are key features for flexible, secure data designs,
widely used in relational databases but lacking in many NoSQL products. widely used in relational databases but lacking in many NoSQL products.
However, there is no need to forego them in ArangoDB. You decide how and when However, there is no need to forego them in ArangoDB. You decide how and when
@ -32,73 +27,67 @@ Furthermore, ArangoDB offers a JavaScript framework called Foxx that is
executed in the database server with direct access to the data. Build your own executed in the database server with direct access to the data. Build your own
data-centric microservices with a few lines of code: data-centric microservices with a few lines of code:
Microservice Example Microservice Example
Microservice Example Microservice Example [Microservice Example]
By extending the HTTP API with user code written in JavaScript, ArangoDB can be By extending the HTTP API with user code written in JavaScript, ArangoDB can be
turned into a strict schema-enforcing persistence engine. turned into a strict schema-enforcing persistence engine.
Next step, bundle your Foxx application as a docker_container and get it Next step, bundle your Foxx application as a docker_container and get it
running in the cloud. running in the cloud.
Other features of ArangoDB include: Other features of ArangoDB include:
* Schema-free schemata let you combine the space efficiency of MySQL with
* Schema-free schemata let you combine the space efficiency of MySQL with the the performance power of NoSQL
performance power of NoSQL * Use a data-centric microservices approach with ArangoDB Foxx and fuse
* Use a data-centric microservices approach with ArangoDB Foxx and fuse your your application-logic and database together for maximal throughput
application-logic and database together for maximal throughput * JavaScript for all: no language zoo, you can use one language from your
* JavaScript for all: no language zoo, you can use one language from your
browser to your back-end browser to your back-end
* ArangoDB is multi-threaded - exploit the power of all your cores * ArangoDB is multi-threaded - exploit the power of all your cores
* Flexible data modeling: model your data as combination of key-value pairs, * Flexible data modeling: model your data as combination of key-value
documents or graphs - perfect for social relations pairs, documents or graphs - perfect for social relations
* Free index choice: use the correct index for your problem, be it a skip list * Free index choice: use the correct index for your problem, be it a skip
or a fulltext search list or a fulltext search
* Configurable durability: let the application decide if it needs more * Configurable durability: let the application decide if it needs more
durability or more performance durability or more performance
* Powerful query language (AQL) to retrieve and modify data * Powerful query language (AQL) to retrieve and modify data
* Transactions: run queries on multiple documents or collections with optional * Transactions: run queries on multiple documents or collections with
transactional consistency and isolation optional transactional consistency and isolation
* Replication and Sharding: set up the database in a master-slave configuration * Replication and Sharding: set up the database in a master-slave
or spread bigger datasets across multiple servers configuration or spread bigger datasets across multiple servers
* It is open source (Apache License 2.0) * It is open source (Apache License 2.0)
For more in-depth information read the design_goals_of_ArangoDB For more in-depth information read the design_goals_of_ArangoDB
***** Latest Release - ArangoDB 2.8 *****
Latest Release - ArangoDB 2.6 The What's_new_in_ArangoDB_2.8 can be found in the documentation.
AQL Graph Traversals / Pattern Matching: AQL offers a new feature to traverse
The What’s_new_in_ArangoDB_2.6 can be found in the documentation. over a graph without writing JavaScript functions but with all the other
New collection export HTTP REST API: ArangoDB now provides a dedicated features you know from AQL. For this purpose, a special version of FOR
collection export API, which can take snapshots of entire collections more variable-name IN expression has been introduced.
efficiently than the general-purpose cursor API. The export API is useful to The added Array Indexes are a major improvement to ArangoDB that you will love
transfer the contents of an entire collection to a client application. and never want to miss again. Hash indexes and skiplist indexes can now be
Added batch document removal and lookup commands: The commands defined for array values as well, so its freaking fast to access documents
collection.lookupByKeys(keys) and collection.removeByKeys(keys) have been added by individual array values.
for collection objects. These can be used to perform multi-document lookup and Additional, there is a cool new aggregation feature that was added after the
removal operations efficiently from the ArangoShell. beta releases. AQL introduces the keyword AGGREGATE for use in AQL COLLECT
Added AQL UPSERT command: This adds an UPSERT statement to AQL that is a statements. Using AGGREGATE allows more efficient aggregation (incrementally
combination of both INSERT and UPDATE / REPLACE. The UPSERT will search for a while building the groups) than previous versions of AQL, which built group
matching document using a user-provided example. If no document matches the aggregates afterwards from the total of all group values
example, the insert part of the UPSERT statement will be executed. If there is Optimizer improvements: The AQL query optimizer can now use indexes if multiple
a match, the update / replace part will be carried out. filter conditions on attributes of the same collection are combined with
We have simplified the return value syntax for data-modification AQL queries, logical ORs, and if the usage of indexes would completely cover these
added an alternative implementation for AQL COLLECT that uses a hash table for conditions.
grouping and does not require its input elements to be sorted. ArangoDB 2.8 now has an automatic deadlock detection for transactions. A
Other optimizations and speedups in AQL relate to subqueries, return values and deadlock is a situation in which two or more concurrent operations (user
queries containing big IN lists for index lookups. transactions or AQL queries) try to access the same resources (collections,
Arangoimp can now optionally update or replace existing documents, provided the documents) and need to wait for the others to finish, but none of them can make
import data contains documents with _key attributes. any progress.
Foxx Improvements Foxx Improvements
Added Configuration and Dependencies so that manifests can now define The module resolution used by require now behaves more like in node.js. The
configuration options, as well as dependencies on other Foxx apps. With the org/arangodb/request module now returns response bodies for error responses by
Mocha Test framework you can now write_tests_for_your_Foxx_apps. The API default. The old behavior of not returning bodies for error responses can be
documentation has been updated to Swagger 2. re-enabled by explicitly setting the option returnBodyOnError to false.
***** More Information *****
More Information
Please check the Installation_Manual for installation and compilation Please check the Installation_Manual for installation and compilation
instructions. instructions.
The User_Manual has an introductory chapter showing the basic operations of The User_Manual has an introductory chapter showing the basic operations of
ArangoDB. ArangoDB.
***** Stay in Contact *****
Stay in Contact
We really appreciate feature requests and bug reports. Please use our Github We really appreciate feature requests and bug reports. Please use our Github
issue tracker for reporting them: issue tracker for reporting them:
https://github.com/arangodb/arangodb/issues https://github.com/arangodb/arangodb/issues

14
cmake/test_boost.cpp Normal file
View File

@ -0,0 +1,14 @@
#include <boost/test/unit_test.hpp>
struct TestSetup {
TestSetup() {
BOOST_TEST_MESSAGE("test message");
}
};
BOOST_FIXTURE_TEST_SUITE(Test, TestSetup)
BOOST_AUTO_TEST_CASE (test_Test1) {
}
BOOST_AUTO_TEST_SUITE_END()

14
utils/generateREADME.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
set -e
IN=${1:-README.md}
OUT=${2:-README}
fgrep -v "[Build Status]" $IN \
| fgrep -v "ArangoDB-Logo" \
| fgrep -v "[Build Status]" \
| markdown \
| html2text -style compact -nobs \
| sed -e 's:&gt;:>:g' \
| awk 'BEGIN { s = 0; } { if (length($0) == 0) {if (s != 0) print $0;} else {s = 1; print $0; }}' \
> $OUT