Skip to content

Commit

Permalink
Add 'rhea/' from commit '47c2996c4cc9bffedd64ad0240f0cd11c7edfa5b'
Browse files Browse the repository at this point in the history
git-subtree-dir: rhea
git-subtree-mainline: c0efb7e
git-subtree-split: 47c2996
  • Loading branch information
timfel committed Mar 1, 2016
2 parents c0efb7e + 47c2996 commit 993be43
Show file tree
Hide file tree
Showing 73 changed files with 11,086 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rhea/.coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
service_name: travis-ci

38 changes: 38 additions & 0 deletions rhea/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Compiled Object files
*.slo
*.lo
*.o

# Compiled Dynamic libraries
*.so
*.dylib

# Compiled Static libraries
*.lai
*.la
*.a

# Backup files
*~
*.bak
*.log
.*.sw[a-z]
\#*\#
.\#*
*.tmp

# CMake cruft
/build/
CMakeFiles
Makefile
*.cmake
CMakeCache.txt
CMakeLists.txt.user
CMakeLists.txt.user.*
tags
*.json
.excludes
krb5doxy.tag

# Generated headers
rhea/version.hpp
20 changes: 20 additions & 0 deletions rhea/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: cpp
compiler:
- gcc
- clang
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libboost-test-dev lcov libgemplugin-ruby python-yaml
- gem install coveralls-lcov
script:
- mkdir build
- cd build
- cmake -DBUILD_UNITTESTS=ON -DBUILD_COVERAGE=ON ..
- make
- unit_tests/unit_tests
after_success:
- lcov --directory unit_tests --base-directory=.. --capture --output-file=coverage.info
- lcov --remove coverage.info '/usr*' -o coverage.info
- cd ..
- coveralls-lcov build/coverage.info

21 changes: 21 additions & 0 deletions rhea/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

Developers:
Nocte <nocte@hippie.nu>

Documentation:
Russell Keith-Magee <russell@keith-magee.com>

Contributors:
Håvard Fossli <hfossli@gmail.com>
Juan Pedro Bolívar Puuente <jbo@ableton.com>


This library is based on the Cassowary Constraint Solving Toolkit,
implemented by:

Greg J. Badros <gjb@cs.washington.edu> and
Alan Borning <borning@cs.washington.edu>
University of Washington
Computer Science and Engineering
Seattle, WA 98195-2350

98 changes: 98 additions & 0 deletions rhea/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
project(rhea)
cmake_minimum_required(VERSION 2.8.3)

set(SOVERSION "1")
set(VERSION_MAJOR "0")
set(VERSION_MINOR "2")
set(VERSION_PATCH "4")
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")

set(CPACK_PACKAGE_NAME "librhea${SOVERSION}")

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
endif()

set(BUILD_UNITTESTS 0 CACHE BOOL "Build the unit tests")
set(BUILD_COVERAGE 0 CACHE BOOL "Generate a coverage report (gcc only)")
set(BUILD_DOCUMENTATION 0 CACHE BOOL "Generate Doxygen documentation")

# Prevent problems with RPATH on mac
#
if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
endif()
set(CMAKE_MACOSX_RPATH ON)

# Set up the compiler
#
if(MSVC)
add_definitions(/D_WIN32_WINNT=0x0501 /D_CRT_SECURE_NO_WARNINGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /EHsc /wd4244 /wd4996 ")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /DNDEBUG /MP /GS- /Ox /Ob2 /Oi /Oy /arch:SSE /fp:fast /Zi")
set(CMAKE_LIB_LINKER_FLAGS "${CMAKE_LIB_LINKER_FLAGS} /OPT:REF /SUBSYSTEM:WINDOWS")

else() # Most likely gcc or clang
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif ("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.7")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()

if (BUILD_COVERAGE AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wno-strict-aliasing")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
endif()

add_subdirectory(rhea)

if(BUILD_UNITTESTS)
add_subdirectory(unit_tests)
endif()

# Doxygen documentation
#
if(BUILD_DOCUMENTATION)
find_package(Doxygen)
if (DOXYGEN_FOUND STREQUAL "YES")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
add_custom_target(doxygen ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES api-doc)
get_target_property(DOC_TARGET doc TYPE)
if (NOT DOC_TARGET)
add_custom_target(doc)
endif()
add_dependencies(doc doxygen)
endif()
endif()

set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Incremental constraint solver C++ library")
set(CPACK_PACKAGE_DESCRIPTION "Rhea is a constraint solver that is especially useful for creating user interfaces. It is based on Cassowary.")
set(CPACK_PACKAGE_VENDOR "Nocte")
set(CPACK_PACKAGE_CONTACT "Nocte <nocte@hippie.nu>")
set(CPACK_SOURCE_IGNORE_FILES "CMakefiles;Makefile;CMakeCache.txt;_CPack_Packages;/.git/;.gitignore;")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}_${VERSION}")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md")
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION}")

if(UNIX)
set(CPACK_GENERATOR "DEB")
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)

set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.0), libstdc++6 (>= 4.0)")
add_custom_target(deb dpkg-buildpackage)
add_dependencies(deb dist)

elseif(WIN32)
set(CPACK_GENERATOR "ZIP")
endif()

include(CPack)
Loading

0 comments on commit 993be43

Please sign in to comment.