This repository has been archived by the owner on Sep 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit deabfb6
Showing
282 changed files
with
51,362 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
## Ignore Visual Studio temporary files, build results, and | ||
## files generated by popular Visual Studio add-ons. | ||
|
||
# User-specific files | ||
*.suo | ||
*.userprefs | ||
*.user | ||
|
||
# Build results | ||
output | ||
msvc/vs11/Debug | ||
msvc/vs11/Release | ||
msvc/vs12/Debug | ||
msvc/vs12/Release | ||
|
||
# CMake intermediate files | ||
CMakeCache.txt | ||
Testing/ | ||
CMakeFiles/ | ||
*CMakeScripts/ | ||
*.cmake | ||
!cmake/modules/*.cmake | ||
Makefile | ||
*odatacpp.build/ | ||
odatacpp.xcodeproj/ | ||
|
||
# MSTest test Results | ||
[Tt]est[Rr]esult*/ | ||
[Bb]uild[Ll]og.* | ||
|
||
*_i.c | ||
*_p.c | ||
*.ilk | ||
*.meta | ||
*.dylib | ||
*.obj | ||
*.pdb | ||
*.pgc | ||
*.pgd | ||
*.rsp | ||
*.sbr | ||
*.tlb | ||
*.tli | ||
*.tlh | ||
*.tmp | ||
*.tmp_proj | ||
*.log | ||
*.vspscc | ||
*.vssscc | ||
.builds | ||
*.pidb | ||
*.log | ||
*.scc | ||
|
||
# Visual C++ cache files | ||
ipch/ | ||
*.aps | ||
*.ncb | ||
*.opensdf | ||
*.sdf | ||
*.cachefile | ||
|
||
# Visual Studio profiler | ||
*.psess | ||
*.vsp | ||
*.vspx | ||
|
||
# Guidance Automation Toolkit | ||
*.gpState | ||
|
||
# ReSharper is a .NET codgit ing add-in | ||
_ReSharper*/ | ||
*.[Rr]e[Ss]harper | ||
|
||
# TeamCity is a build add-in | ||
_TeamCity* | ||
|
||
# DotCover is a Code Coverage Tool | ||
*.dotCover | ||
|
||
# NCrunch | ||
*.ncrunch* | ||
.*crunch*.local.xml | ||
|
||
# Installshield output folder | ||
[Ee]xpress/ | ||
|
||
# DocProject is a documentation generator add-in | ||
DocProject/buildhelp/ | ||
DocProject/Help/*.HxT | ||
DocProject/Help/*.HxC | ||
DocProject/Help/*.hhc | ||
DocProject/Help/*.hhk | ||
DocProject/Help/*.hhp | ||
DocProject/Help/Html2 | ||
DocProject/Help/html | ||
|
||
# Click-Once directory | ||
publish/ | ||
|
||
# Publish Web Output | ||
*.Publish.xml | ||
|
||
# Windows Azure Build Output | ||
csx | ||
*.build.csdef | ||
|
||
# Windows Store app package directory | ||
AppPackages/ | ||
|
||
# Others | ||
sql/ | ||
*.Cache | ||
ClientBin/ | ||
[Ss]tyle[Cc]op.* | ||
~$* | ||
*~ | ||
*.dbmdl | ||
*.[Pp]ublish.xml | ||
*.pfx | ||
*.publishsettings | ||
|
||
# RIA/Silverlight projects | ||
Generated_Code/ | ||
|
||
# Backup & report files from converting an old project file to a newer | ||
# Visual Studio version. Backup files are not needed, because we have git ;-) | ||
_UpgradeReport_Files/ | ||
Backup*/ | ||
UpgradeLog*.XML | ||
UpgradeLog*.htm | ||
|
||
# SQL Server files | ||
App_Data/*.mdf | ||
App_Data/*.ldf | ||
|
||
#LightSwitch generated files | ||
GeneratedArtifacts/ | ||
_Pvt_Extensions/ | ||
ModelManifest.xml | ||
|
||
# ========================= | ||
# Windows detritus | ||
# ========================= | ||
|
||
# Windows image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Mac desktop service store files | ||
.DS_Store | ||
|
||
# OSX | ||
xcuserdata | ||
*.o | ||
*.d | ||
test_runner | ||
*.dsym | ||
*.xccheckout | ||
*.so | ||
|
||
# Visual studio | ||
*.i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
set(CMAKE_LEGACY_CYGWIN_WIN32 0) | ||
cmake_minimum_required(VERSION 2.6) | ||
project(odatacpp-server) | ||
|
||
enable_testing() | ||
|
||
set(WARNINGS) | ||
|
||
# Platform (not compiler) specific settings | ||
if(UNIX) # This includes OSX | ||
find_package(Boost REQUIRED COMPONENTS locale filesystem system) | ||
find_package(LibXml2 REQUIRED) | ||
|
||
option(BUILD_SHARED_LIBS "Build shared Libraries." ON) | ||
else() | ||
message(FATAL_ERROR "-- Unsupported Build Platform.") | ||
endif() | ||
|
||
# Compiler (not platform) specific settings | ||
if(("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")) | ||
message("-- Setting clang options") | ||
|
||
set(WARNINGS "-Wall -Wextra -Wcast-qual -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls") | ||
set(OSX_SUPPRESSIONS "-Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder -Wno-ignored-qualifiers -Wno-sometimes-uninitialized -Wno-logical-op-parentheses -Wno-unused-private-field") | ||
set(WARNINGS "${WARNINGS} ${OSX_SUPPRESSIONS}") | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration") | ||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") | ||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11") | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing") | ||
set(STRICT_CXX_FLAGS ${WARNINGS} "-Werror -pedantic") | ||
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") | ||
message("-- Setting gcc options") | ||
|
||
set(WARNINGS "-Wall -Wextra -Wcast-align -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls -Wunreachable-code") | ||
set(LINUX_SUPPRESSIONS "-Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-unused-function -Wno-char-subscripts -Wno-switch -Wno-unused-but-set-parameter -Wno-unused-value -Wno-unused-local-typedefs -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-ignored-qualifiers -Wno-cast-qual -Wno-parentheses -Wno-return-type") | ||
|
||
set(WARNINGS "${WARNINGS} ${LINUX_SUPPRESSIONS}") | ||
set(LD_FLAGS "${LD_FLAGS} -Wl,-z,defs") | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing") | ||
set(STRICT_CXX_FLAGS ${WARNINGS} "-Werror -pedantic") | ||
else() | ||
message("-- Unknown compiler, success is doubtful.") | ||
endif() | ||
|
||
# Reconfigure final output directory | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/output) | ||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/output) | ||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/output) | ||
|
||
# These settings can be used by the test targets | ||
set(ODATACPP_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib) | ||
set(ODATACPP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include) | ||
set(ODATACPP_INCLUDE_DIRS ${ODATACPP_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR}) | ||
set(ODATACPP_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests) | ||
|
||
# OData library targets | ||
set(ODATACPP_LIBRARY ${LIB}odata-library) | ||
|
||
# Everything in the project needs access to the odatacpp include directories | ||
include_directories(${ODATACPP_INCLUDE_DIRS}) | ||
|
||
add_subdirectory(src) | ||
add_subdirectory(tests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ODataCpp Server ver. 1.0.0 | ||
Copyright (c) Microsoft Corporation | ||
All rights reserved. | ||
MIT License | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
# Welcome to ODataCpp-Server | ||
ODataCpp is an open-source C++ library that implements the Open Data Protocol (OData). It supports the [OData protocol version 4.0](http://docs.oasis-open.org/odata/odata/v4.0/os/part1-protocol/odata-v4.0-os-part1-protocol.html). This is the server library that helps you build OData V4 service with C++. | ||
|
||
# Getting started | ||
|
||
## Getting the source | ||
|
||
git clone https://github.com/odata/odatacpp-server | ||
|
||
## Building and testing | ||
|
||
Currently the following target platforms are supported: | ||
|
||
* Windows 32-bit | ||
* OS X | ||
* Linux | ||
|
||
### Building on Windows with Visual Studio 2012/2013 | ||
|
||
1.Please ensure that you have Visual Studio 2012/2013 installed. | ||
|
||
2.Open 'odatacpp.sln' under 'odatacpp-server\msvc' with VS2012/VS2013 and click 'Build Solution' in the 'BUILD' menu. | ||
|
||
3.Built libraries are placed under 'odatacpp-server\output\\\<Configuration\>' where '\<Configuration\>' could be either 'Debug' or 'Release' according to your build configuration in VS2012/VS2013. | ||
|
||
### Building on Windows with MSBuild | ||
|
||
1.Setup build environment for VS2012/VS2013: | ||
|
||
cd odatacpp-server | ||
powershell | ||
.\setup_ps_env_VS2012.ps1 (or .\setup_ps_env_VS2013.ps1) | ||
|
||
If you receive an error message like 'running scripts is disabled on this system', please run PowerShell as administrator, type the following command, and then rerun the setup script above. | ||
|
||
Set-ExecutionPolicy RemoteSigned | ||
|
||
2.Here are some examples to invoke MSBuild: | ||
|
||
1) Build Debug version of ODataCpp-Server libraries in parallel. | ||
|
||
msbuild /m | ||
|
||
2) Build Release version of ODataCpp-Server libraries. | ||
|
||
msbuild /p:Configuration=Release | ||
|
||
3) Rebuild Debug version of ODataCpp-Server. | ||
|
||
msbuild /t:Rebuild /p:Configuration=Debug | ||
|
||
4) Clean build outputs. | ||
|
||
msbuild /t:Clean | ||
|
||
3.Built libraries are placed under the same folder of VS2012/VS2013. Actually they are no different than the ones built by VS2012/VS2013. | ||
|
||
### Running tests on Windows | ||
|
||
1.After you have successfully built the libraries, you can run our functional tests to check the basic functionality. | ||
|
||
1) Test the Debug version of ODataCpp-Server Libraries: | ||
|
||
cd odatacpp-server\output\Debug | ||
TestRunner.exe odata_functional_test.vs11d.dll /Desktop | ||
|
||
2) Test the Release version of ODataCpp-Server Libraries: | ||
|
||
cd odatacpp\output\Release | ||
TestRunner.exe odata_functional_test.vs11.dll /Desktop | ||
|
||
The '/Desktop' option here indicates to run tests for desktop (rather than rt). | ||
|
||
### Building on OS X | ||
|
||
1.Please ensure that you have OS X later than 10.9, Xcode later than 5.0 and Xcode Command Line Tools installed. | ||
|
||
2.Install the Homebrew package manager (http://brew.sh). Skip this step if you want to use your own package manager. | ||
|
||
3.Install the required packages to build ODataCpp-Server via Homebrew or your own package manager. | ||
|
||
brew install cmake boost | ||
|
||
4.Return to the root folder of ODataCpp-Server and generate 'Makefile' using CMake. | ||
|
||
cmake -DCMAKE_BUILD_TYPE=Debug # replace 'Debug' with 'Release' if needed | ||
make | ||
|
||
5.Please find your built libraries under 'output'. | ||
|
||
### Running tests on OS X | ||
|
||
After successfully building the libraries, you can run the functional and end-to-end tests via the terminal. | ||
|
||
cd odatacpp-server/output | ||
./test_runner *tests* | ||
|
||
### Building on Linux | ||
|
||
1.This document is based on Ubuntu 14.04 LTS 64-bit. Process on other Linux distributions should be similar. | ||
|
||
2.Install the required packages to build ODataCpp-Server via apt-get or your own package manager. | ||
|
||
sudo apt-get install cmake libxml2 libxml2-dev libboost1.55-dev libboost-system1.55.0 libboost-system1.55-dev libboost-locale1.55.0 libboost-locale1.55-dev libboost-filesystem1.55.0 libboost-filesystem1.55-dev | ||
|
||
You can choose other versions of boost to install but they are not guaranteed to work. | ||
|
||
3.Return to the root folder of ODataCpp-Server and generate 'Makefile' using CMake. | ||
|
||
cmake -DCMAKE_BUILD_TYPE=Debug # replace 'Debug' with 'Release' if needed | ||
make # don't build in parallel because gcc will be very likely to crash | ||
|
||
4.Please find your built libraries under 'output'. | ||
|
||
### Running tests on Linux | ||
|
||
After successfully building the libraries, you can run the functional and end-to-end tests via the terminal. | ||
|
||
cd odatacpp-server/output | ||
./test_runner *tests* | ||
|
||
# Documentation | ||
Please refer to our [GitHub pages](https://odata.github.io/odatacpp-server) for documentation. | ||
|
||
# Community | ||
## Issue tracker | ||
To report bugs and require features, please use our [issue tracker](https://github.com/odata/odatacpp-server/issues?state=open). | ||
|
||
## Team blog | ||
Please visit http://blogs.msdn.com/b/odatateam/. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Marker file indicating root of build system. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.root))\msvc\Common.Build.settings" /> | ||
|
||
<ItemGroup Condition="'$(BuildInRazzle)'=='' or '$(BuildAgainstVSInstallation)'==''"> | ||
<ProjectFile Include="msvc\dirs.proj"/> | ||
</ItemGroup> | ||
|
||
<Import Project="$(TargetsPath)\Common.Build.Traversal.targets" /> | ||
|
||
</Project> |
Oops, something went wrong.