This repository was archived by the owner on Nov 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Showing
61 changed files
with
2,007 additions
and
1,593 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
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 |
---|---|---|
|
@@ -5,3 +5,4 @@ end_of_line = lf | |
insert_final_newline = true | ||
charset = utf-8 | ||
indent_style = tab | ||
indent_size = 4 |
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 |
---|---|---|
|
@@ -411,4 +411,4 @@ install_manifest.txt | |
Testing/ | ||
*.cmake | ||
cmake-build-debug/ | ||
|
||
*.cbp |
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 |
---|---|---|
@@ -1,14 +1,44 @@ | ||
language: cpp | ||
sudo: required | ||
dist: trusty | ||
|
||
compiler: | ||
- gcc | ||
- clang | ||
|
||
matrix: | ||
allow_failures: | ||
- compiler: clang | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- g++-6 | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
- software-properties-common | ||
- python-software-properties | ||
- cmake | ||
|
||
before_install: | ||
# gcc | ||
- if [ "$CXX" == "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi | ||
|
||
# clang | ||
- if [ "$CXX" == "clang++" ]; then sudo apt-get install -y wget; fi | ||
- if [ "$CXX" == "clang++" ]; then wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -; fi | ||
- if [ "$CXX" == "clang++" ]; then sudo bash -c 'echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main" >> /etc/apt/sources.list'; fi | ||
- if [ "$CXX" == "clang++" ]; then sudo bash -c 'echo "deb-src http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main" >> /etc/apt/sources.list'; fi | ||
|
||
- sudo apt-get update | ||
|
||
install: | ||
# gcc | ||
- if [ "$CXX" == "g++" ]; then sudo apt-get install -y g++-6; fi | ||
- if [ "$CXX" == "g++" ]; then export CXX="g++-6"; fi | ||
|
||
# clang | ||
- if [ "$CXX" == "clang++" ]; then sudo apt-get install -y clang++-3.9 libc++-dev; fi | ||
- if [ "$CXX" == "clang++" ]; then export CXX="clang++-3.9"; fi | ||
|
||
script: | ||
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++-6 . | ||
- cmake . | ||
- make | ||
- ctest --verbose | ||
|
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 |
---|---|---|
@@ -1,27 +1,43 @@ | ||
cmake_minimum_required(VERSION 3.2.2) | ||
cmake_minimum_required(VERSION 2.8) | ||
project(Hippocrates) | ||
|
||
if(APPLE) | ||
set(CMAKE_C_COMPILER /usr/local/bin/gcc) | ||
set(CMAKE_CXX_COMPILER /usr/local/bin/g++) | ||
endif() | ||
set(CMAKE_BUILD_TYPE Release) | ||
|
||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/out/lib) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/out/tests) | ||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall") | ||
|
||
set(CMAKE_C_FLAGS -fPIC) | ||
set(CMAKE_CXX_FLAGS -fPIC) | ||
set(CMAKE_CXX_FLAGS "-fPIC -std=c++1z") | ||
|
||
add_subdirectory(Core) | ||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") | ||
set(CMAKE_SHARED_LINKER_FLAGS -lc++experimental) | ||
endif() | ||
|
||
add_subdirectory(Core) | ||
add_library(Hippocrates SHARED $<TARGET_OBJECTS:Core>) | ||
|
||
set(THREADS_PREFER_PTHREAD_FLAG ON) | ||
find_package(Threads REQUIRED) | ||
|
||
target_link_libraries(Hippocrates -lstdc++fs) | ||
target_link_libraries(Hippocrates Threads::Threads) | ||
|
||
MACRO(HEADER_DIRECTORIES return_list sources_folder) | ||
FILE(GLOB_RECURSE headers [RELATIVE ${sources_folder}] *.hpp *.h) | ||
SET(dir_list "") | ||
FOREACH(file_path ${headers}) | ||
GET_FILENAME_COMPONENT(dir_path ${file_path} PATH) | ||
SET(dir_list ${dir_list} ${dir_path}) | ||
ENDFOREACH() | ||
LIST(REMOVE_DUPLICATES dir_list) | ||
SET(${return_list} ${dir_list}) | ||
ENDMACRO() | ||
|
||
HEADER_DIRECTORIES(HEADERS Core/Sources) | ||
target_include_directories(Hippocrates PUBLIC ${HEADERS}) | ||
|
||
enable_testing() | ||
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 |
---|---|---|
@@ -1,2 +1,16 @@ | ||
file(GLOB_RECURSE SOURCES [RELATIVE Sources] *.cpp *.hpp *.c *.h) | ||
add_library(Core SHARED OBJECT ${SOURCES}) | ||
|
||
MACRO(HEADER_DIRECTORIES return_list sources_folder) | ||
FILE(GLOB_RECURSE headers [RELATIVE ${sources_folder}] *.hpp *.h) | ||
SET(dir_list "") | ||
FOREACH(file_path ${headers}) | ||
GET_FILENAME_COMPONENT(dir_path ${file_path} PATH) | ||
SET(dir_list ${dir_list} ${dir_path}) | ||
ENDFOREACH() | ||
LIST(REMOVE_DUPLICATES dir_list) | ||
SET(${return_list} ${dir_list}) | ||
ENDMACRO() | ||
|
||
HEADER_DIRECTORIES(HEADERS Sources) | ||
target_include_directories(Core PUBLIC ${HEADERS}) |
Oops, something went wrong.