Skip to content

0.7 dev #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 116 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
ba9dede
Added loader interface and default shared library library.
NTSFka Aug 26, 2016
305155c
Redesigned plugins loading system. Plugins are loaded immediately whe…
NTSFka Sep 21, 2016
66da886
Marked plugin::Api destructor as pure virtual.
NTSFka Sep 22, 2016
95fe9d9
Added isEmpty member function to StringView.
NTSFka Oct 3, 2016
0fc2a0f
Added plugin tests and some other plugin part improvements.
NTSFka Oct 17, 2016
1a20a74
Improved plugin part tests.
NTSFka Oct 18, 2016
81bbe00
Build test plugins only when testing is enabled.
NTSFka Oct 18, 2016
1ed1bf5
Moved plugin check from SharedLibrary to SharedLibraryLoader.
NTSFka Oct 18, 2016
4b67a52
Documentation and log message improvements.
NTSFka Oct 18, 2016
707079e
Fixed test plugin file names.
NTSFka Oct 18, 2016
1882956
Compare pointers against nullptr instead of implicit bool cast.
NTSFka Oct 18, 2016
37e24e0
Changed SharedLibrary prefix constant - removed 'cece-' part.
NTSFka Oct 18, 2016
80862e7
Moved travis-ci testing part to script part where failures are detected.
NTSFka Oct 18, 2016
31627c8
Updated CMakeLists.txt for plugin tests.
NTSFka Oct 18, 2016
f859b92
Added link dependency for plugins (issue on Windows).
NTSFka Oct 18, 2016
185a30a
Fixed linker error on Windows.
NTSFka Oct 22, 2016
d6198e6
Added code for exporting entry functions from plugins on Windows.
NTSFka Oct 22, 2016
d8f0224
Changed testing macro to get better error messages.
NTSFka Oct 22, 2016
8a010cb
Fixed undefined macro on non-Windows platforms
NTSFka Oct 24, 2016
68af4ed
Changed travis-ci script behaviour
NTSFka Oct 24, 2016
f5d780b
Moved tests from main directory to unittests directory.
NTSFka Oct 25, 2016
378c7ba
Changed gtest include style (library is local)
NTSFka Oct 25, 2016
94638c0
Added `Test` suffix to plugin test files.
NTSFka Oct 25, 2016
67b7a30
Removed old CMake code for tests.
NTSFka Oct 25, 2016
c5a2fed
Build render test only when rendering is enabled.
NTSFka Oct 25, 2016
b2ef847
Trying to solve Win32 test path issues
NTSFka Oct 25, 2016
84422cf
Added testing configuration.
NTSFka Oct 26, 2016
faf1d88
Returned error mode changing for plugin loading on Win32.
NTSFka Oct 26, 2016
8387d0e
Disabled MinGW builds - not working yet.
NTSFka Oct 26, 2016
3379189
Removed testing plugin copy.
NTSFka Oct 26, 2016
a7e63b8
Small cleanup in cmake files.
NTSFka Oct 27, 2016
0d111ea
Added export all for MinGW
NTSFka Oct 27, 2016
3e940a1
Allowed MinGW builds on appveyor.
NTSFka Oct 27, 2016
b4e930d
Removed MinGW allowed failure
NTSFka Oct 27, 2016
6a7537d
Updated version to 0.7 as next major stable version.
NTSFka Oct 27, 2016
3cdee3e
Removed noexcept specification from Factory create functions.
NTSFka Oct 27, 2016
ce072b4
Fixed onLoad/onUnload plugin API calls.
NTSFka Oct 31, 2016
775db47
Improved plugin::Manager tests.
NTSFka Oct 31, 2016
5d1420b
Cleanup in plugin classes.
NTSFka Oct 31, 2016
3d7c26c
Added relational operators to StringView.
NTSFka Nov 1, 2016
f8f63d1
Documentation improvements.
NTSFka Nov 1, 2016
ab5fa3b
Big plugin API changes.
NTSFka Nov 1, 2016
6df942c
Added plugin Context test.
NTSFka Nov 1, 2016
c623356
Improved plugin Context documentation.
NTSFka Nov 1, 2016
d92af60
Added function to manually add a plugin to Manager.
NTSFka Nov 1, 2016
67cbd9c
Added warning option.
NTSFka Nov 3, 2016
129f8a6
Fixed Manager default ctor noexcept error.
NTSFka Nov 3, 2016
d8c7b50
Fixed min/max macro issue on Windows platform.
NTSFka Nov 3, 2016
c9575bc
Increased API version number.
NTSFka Nov 3, 2016
85578b7
Added plugin specific exceptions.
NTSFka Nov 3, 2016
156ffeb
Modified code to use plugin exceptions.
NTSFka Nov 3, 2016
0da1d92
Refractored plugin::Context code.
NTSFka Nov 3, 2016
42958b7
Improved Manager tests - different plugins.
NTSFka Nov 3, 2016
c66a657
Improved plugin::Context tests
NTSFka Nov 3, 2016
9f364df
Added new exception type PluginNotFoundException.
NTSFka Nov 3, 2016
d9d8a93
Replaced the not keyword by ! (not supported by MSVC).
NTSFka Nov 4, 2016
9a233b1
Hide windows.h inclusion - many problems with their macros.
NTSFka Nov 4, 2016
b8dddf8
Removed throw test plugin - undefined behaviour.
NTSFka Nov 4, 2016
d05ee4e
Initialized "unused" variable.
NTSFka Nov 4, 2016
a523f5f
Fixed invalid shared library plugins test paths for MSVC.
NTSFka Nov 4, 2016
5aa3937
Added Api test for default implementation.
NTSFka Nov 4, 2016
65476d4
Interface and implementation separation.
NTSFka Nov 4, 2016
4020828
Some cmake cleanup.
NTSFka Nov 4, 2016
190012d
Added code coverage generation support.
NTSFka Nov 4, 2016
9604049
Added changelog to track important changes between versions.
NTSFka Nov 4, 2016
7583f7e
Moved SharedLibrary to 'os' namespace.
NTSFka Nov 8, 2016
0cce7d7
Added working directory support for FilePath.
NTSFka Nov 8, 2016
dcc87f9
Improved os::SharedLibrary and added tests.
NTSFka Nov 8, 2016
8a88702
Moved FilePath to io namespace and some improvements.
NTSFka Nov 8, 2016
0ced88f
Changed openDirectory behaviour for Windows (skips '.' and '..').
NTSFka Nov 8, 2016
a230e59
Moved some files into io namespace.
NTSFka Nov 8, 2016
eb96f09
Moved Log into log namespace.
NTSFka Nov 8, 2016
99905fd
Moved Atomic & Mutex into async namespace.
NTSFka Nov 10, 2016
1301765
Moved Units into unit namespace.
NTSFka Nov 10, 2016
3b920a3
Moved some files into math namespace.
NTSFka Nov 11, 2016
09a63ef
Changed old includes to the new math ones.
NTSFka Nov 11, 2016
e7d8fe6
Moved tokenizer and parser to lang namespace.
NTSFka Nov 11, 2016
e938a74
Moved files from cece namespace to more specialized namespaces.
NTSFka Nov 11, 2016
8c77fb2
Moved classes from simulator into simulation namespace.
NTSFka Nov 11, 2016
cdd168d
Changed config.hpp usage.
NTSFka Nov 11, 2016
65fa739
Removed from compilation Visualization.cpp when rendering is disabled.
NTSFka Nov 11, 2016
86f8d5b
Added path normalization on Windows.
NTSFka Nov 11, 2016
e041f31
Pointer containers cleanup.
NTSFka Nov 11, 2016
819703e
Moved extension classes to simulation namespace.
NTSFka Nov 21, 2016
885b60e
Changed container type alias to stronger types.
NTSFka Nov 22, 2016
d621cda
Merge branch 'containers'
NTSFka Nov 22, 2016
e2d459f
Fixed container types.
NTSFka Nov 22, 2016
7cfa6aa
Improved String format functions and added tests.
NTSFka Nov 22, 2016
9a25bf1
UniquePtr and SharedPtr improvements
NTSFka Nov 22, 2016
338e6e0
Fixed missing include
NTSFka Nov 22, 2016
61e9e80
Moved Parameters from the core namespace.
NTSFka Nov 23, 2016
3d1def9
Config part cleanup.
NTSFka Nov 25, 2016
5e21652
Added config part tests.
NTSFka Nov 25, 2016
58881c3
Added new specialized config exceptions.
NTSFka Nov 28, 2016
be5699c
Fixed typo in the Converter name.
NTSFka Nov 28, 2016
44f43ce
Added converter specializations.
NTSFka Nov 28, 2016
16f165b
Moved config::Converter into io namespace.
NTSFka Nov 29, 2016
d06311f
Added additional parsing functions for String.
NTSFka Nov 29, 2016
09c8cd5
Added converter specializations for some primitive types.
NTSFka Nov 29, 2016
9704f11
Small config cleanup.
NTSFka Nov 29, 2016
e7c2734
Changed test values to fit in used types.
NTSFka Nov 29, 2016
dec0f9b
Remove noexcept specifier from the Converter functions.
NTSFka Nov 29, 2016
428c033
Changed string conversion buffer sizes.
NTSFka Nov 29, 2016
6919553
Fixed signed/unsigned comparision warning in String.cpp.
NTSFka Dec 2, 2016
61cabad
Improvements and cleanup of the log part.
NTSFka Dec 2, 2016
efbdf71
Updated invalid file path in hope it doesn't exists on Windows.
NTSFka Dec 2, 2016
aaacfd2
New version of unit library.
NTSFka Dec 9, 2016
714600c
Improved unit test.
NTSFka Dec 9, 2016
ded0f42
Improved Unit core class.
NTSFka Feb 14, 2017
a66f7c4
Renamed unit exception and improved tests.
NTSFka Feb 15, 2017
e0d5946
Improved unit module and tests.
NTSFka Feb 15, 2017
8032efd
Added helper functions to build DynamicImpl Detail value.
NTSFka Feb 16, 2017
73d1e5e
Added function to add and remove custom unit symbol for unit parser.
NTSFka Feb 16, 2017
e1e7659
Small change to fix GCC 4.9 internal compiler error: Segmentation fault.
NTSFka Feb 16, 2017
c20ec07
Removed + operator for Units lambdas (not necessary) - MSVC compilati…
NTSFka Feb 17, 2017
5c02e5e
Added some additional units.
NTSFka Feb 17, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,7 @@ before_script:
- popd

script:
- VERBOSE=1 cmake --build build

after_success:
- pushd build
- GTEST_COLOR=1 ctest --verbose
- popd
- VERBOSE=1 cmake --build build && pushd build && GTEST_COLOR=1 ctest --verbose && popd

notifications:
slack:
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Change Log
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [unreleased]
### Added
- Custom plugin loaders (old version supported only shared libraries).

### Changed
- Interface and implementation separation.
- Changed plugin API.
- Fixed MinGW build.

[unreleased]: https://github.com/georgievlab/CeCe-core/compare/v0.6.0...HEAD
128 changes: 128 additions & 0 deletions CMake/Functions.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# ######################################################################### #
# Georgiev Lab (c) 2015-2016 #
# ######################################################################### #
# Department of Cybernetics #
# Faculty of Applied Sciences #
# University of West Bohemia in Pilsen #
# ######################################################################### #
# #
# This file is part of CeCe. #
# #
# CeCe is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# CeCe is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with CeCe. If not, see <http://www.gnu.org/licenses/>. #
# #
# ######################################################################### #

##
## Add CeCe test.
## NAME: Test name
##
function (cece_add_test NAME)
if (NOT CECE_TESTS_BUILD)
return ()
endif ()

set(FULLNAME "cece-${NAME}_test")

include(CMakeParseArguments)
cmake_parse_arguments(ARG "" "" "SOURCES;LIBRARIES" ${ARGN})

# Create executable
add_executable(${FULLNAME}
${ARG_SOURCES}
)

# Properties
set_target_properties(${FULLNAME} PROPERTIES
CXX_STANDARD 11
CXX_EXTENSIONS Off
CXX_STANDARD_REQUIRED On
)

# Libraries
target_link_libraries(${FULLNAME}
PRIVATE cece
PRIVATE ${ARG_LIBRARIES}
PRIVATE gtest_main
)

if (CMAKE_COMPILER_IS_GNUCXX AND CECE_TESTS_BUILD AND CECE_COVERAGE)
target_compile_options(${FULLNAME} PRIVATE --coverage)
target_link_libraries(${FULLNAME} PRIVATE --coverage)
endif ()

# Register test
add_test(
NAME ${FULLNAME}
COMMAND ${FULLNAME}
WORKING_DIRECTORY $<TARGET_FILE_DIR:${FULLNAME}>
)

if (WIN32 OR MINGW)
# Windows doen't support rpath, so we need to copy the main library to the test executable
add_custom_command(TARGET ${FULLNAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:cece> $<TARGET_FILE_DIR:${FULLNAME}>
)
endif ()
endfunction ()

# ######################################################################### #

##
## Initialize GIT submodule
## PATH: Submodule path
## [CHECK]: Path to tested file in submodule (default CMakeLists.txt)
##
function(cece_init_submodule PATH)
if (ARGC GREATER 1)
set(TEST_PATH "${PATH}/${ARGV1}")
else ()
set(TEST_PATH "${PATH}/CMakeLists.txt")
endif ()

# Check if file exists
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${TEST_PATH}")
find_package(Git REQUIRED)
execute_process(
COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive ${PATH}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif ()
endfunction ()

# ######################################################################### #

##
## Initialize vendor submodule (in `vendor` directory).
## PATH: Vendor submodule name
## [CHECK]: Path to tested file in submodule (default CMakeLists.txt)
##
function(cece_init_vendor PATH)
cece_init_submodule(vendor/${PATH} ${ARGN})
endfunction ()

# ######################################################################### #

##
## Enable CCACHE for given directory.
## DIRECTORY: Cache directory.
##
function (cece_enable_ccache)
find_program(CCACHE_FOUND ccache)
if (CCACHE_FOUND)
set_property(DIRECTORY ${DIRECTORY} PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(DIRECTORY ${DIRECTORY} PROPERTY RULE_LAUNCH_LINK ccache)
endif ()
endfunction ()

# ######################################################################### #
79 changes: 52 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ cmake_minimum_required(VERSION 3.1)
# ######################################################################### #

project(cece
VERSION 0.6.0
VERSION 0.7.0
LANGUAGES CXX
)

# ######################################################################### #

include(CMake/Functions.cmake)

# ######################################################################### #

# Options
option(CECE_RENDER "Enable simulation rendering (vizualization support)" On)
option(CECE_RENDER_CHECK_ERRORS "Enable renderer errors checking." Off)
Expand All @@ -52,20 +56,19 @@ if (APPLE)
set(MACOSX_VERSION_MIN "10.9" CACHE STRING "Minimum version of MacOS X to support")
endif ()

# Allow to enable code coverage, only for tests and GCC
if (CMAKE_COMPILER_IS_GNUCXX AND CECE_TESTS_BUILD)
option(CECE_COVERAGE "Enable code coverage generation for tests" Off)
endif ()

# ######################################################################### #

# Build unit tests
if (CECE_TESTS_BUILD)
enable_testing()

# Init google test submodule
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/vendor/googletest/CMakeLists.txt")
find_package(Git REQUIRED)
execute_process(
COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive vendor/googletest
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif ()
cece_init_vendor(googletest)

message(STATUS "Build unit tests")
set(BUILD_GMOCK Off CACHE BOOL "" FORCE)
Expand All @@ -75,21 +78,11 @@ if (CECE_TESTS_BUILD)
add_subdirectory(vendor/googletest)
target_include_directories(gtest INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/vendor/googletest/include)

find_program(CCACHE_FOUND ccache)
if (CCACHE_FOUND)
set_property(DIRECTORY vendor/googletest PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(DIRECTORY vendor/googletest PROPERTY RULE_LAUNCH_LINK ccache)
endif ()
cece_enable_ccache(vendor/googletest)
endif ()

# Init google test submodule
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/vendor/Box2D/Box2D/CMakeLists.txt")
find_package(Git REQUIRED)
execute_process(
COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive vendor/Box2D
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endif ()
# Init Box2D submodule
cece_init_vendor(Box2D Box2D/CMakeLists.txt)

# Add Box2D physics library
set(BOX2D_BUILD_EXAMPLES Off CACHE BOOL "" FORCE)
Expand All @@ -104,15 +97,47 @@ add_subdirectory(vendor/Box2D/Box2D)
set_target_properties(Box2D PROPERTIES POSITION_INDEPENDENT_CODE On)
target_include_directories(Box2D INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/vendor/Box2D/Box2D)

find_program(CCACHE_FOUND ccache)
if (CCACHE_FOUND)
set_property(DIRECTORY vendor/Box2D/Box2D PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(DIRECTORY vendor/Box2D/Box2D PROPERTY RULE_LAUNCH_LINK ccache)
endif ()
cece_enable_ccache(vendor/Box2D/Box2D)

# ######################################################################### #

# CeCe library
add_subdirectory(cece)
add_subdirectory(src)

# ######################################################################### #

if (CECE_TESTS_BUILD)
add_subdirectory(unittests)

if (CMAKE_COMPILER_IS_GNUCXX AND CECE_COVERAGE)
find_program(LCOV lcov)
find_program(GENHTML genhtml)

if (NOT LCOV)
message(FATAL_ERROR "lcov not found!")
endif ()

if (NOT GENHTML)
message(FATAL_ERROR "genhtml not found!")
endif ()

# Add custom target for gcov
add_custom_target(cece-coverage
# Cleanup lcov
${LCOV} --directory . --zerocounters

# Run tests
COMMAND ctest

# Capturing lcov counters and generating report
COMMAND ${LCOV} --directory . --capture --output-file coverage0.info
COMMAND ${LCOV} -r coverage0.info 'vendor/*' 'unittests/*' '/usr*' --output-file coverage.info
COMMAND ${GENHTML} --demangle-cpp -o coverage coverage.info
COMMAND ${CMAKE_COMMAND} -E remove coverage0.info

WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
endif ()
endif ()

# ######################################################################### #
8 changes: 2 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

os: Visual Studio 2015

version: 0.6.0.{build}
version: 0.7.0.{build}

environment:
matrix:
Expand All @@ -42,10 +42,6 @@ environment:
- GENERATOR: MinGW Makefiles
CECE_RENDER: Off

matrix:
allow_failures:
- GENERATOR: MinGW Makefiles

# Branches to build
branches:
except:
Expand All @@ -62,6 +58,6 @@ build_script:
- pushd build && cmake --build . --config Release & popd

test_script:
- pushd build && ctest --verbose & popd
- pushd build && ctest -C Release --verbose & popd

# ######################################################################### #
Loading