Skip to content

Commit

Permalink
ADE version 0.1.1c (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hardcode84 authored Sep 25, 2018
1 parent e3725de commit b9ff797
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ cmake_minimum_required(VERSION 3.2)

project(ade)

option(ENABLE_TESTING "Build tests, require google test" OFF)
option(BUILD_TUTORIAL "Build tutorial samples" OFF)
option(FORCE_ADE_ASSERTS "Always enable ADE_ASSERT" OFF)
option(BUILD_DOCUMENTATION "Build doxygen documentation" OFF)
option(ENABLE_ADE_TESTING "Build tests, require google test" OFF)
option(BUILD_ADE_TUTORIAL "Build tutorial samples" OFF)
option(FORCE_ADE_ASSERTS "Always enable ADE_ASSERT" OFF)
option(BUILD_ADE_DOCUMENTATION "Build doxygen documentation" OFF)

# TODO: this is horrible hack, we must follow cmake
# build/install policy
Expand Down Expand Up @@ -48,12 +48,12 @@ endif(MSVC)

add_subdirectory(sources/ade/)

if(ENABLE_TESTING)
if(ENABLE_ADE_TESTING)
enable_testing()
add_subdirectory(sources/tests)
endif()

if(BUILD_TUTORIAL)
if(BUILD_ADE_TUTORIAL)
add_subdirectory(tutorial)
endif()

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ After a successfull compilation binaries should reside in `./lib` and

to run ADE Framework test suite (ADE Framework tests + utility tests).

If you want to build tutorial samples set `-DBUILD_TUTORIAL=ON` to
If you want to build tutorial samples set `-DBUILD_ADE_TUTORIAL=ON` to
cmake.

Building with tutorial:

$ cmake -DBUILD_TUTORIAL=ON /path/to/ade/repository
$ cmake -DBUILD_ADE_TUTORIAL=ON /path/to/ade/repository
$ make -j

Additional information on tutorial samples can be found in
`./tutorial/README.md`.

If you want to build library tests set `-DENABLE_TESTING=ON` to cmake.
If you want to build library tests set `-DENABLE_ADE_TESTING=ON` to cmake.
Tests require gtest (https://github.com/google/googletest/releases).

Building gtest:
Expand All @@ -46,7 +46,7 @@ Building gtest:

Building with tests:

$ cmake -DENABLE_TESTING=ON -DGTEST_ROOT=/gtest/install/path /path/to/ade/repository
$ cmake -DENABLE_ADE_TESTING=ON -DGTEST_ROOT=/gtest/install/path /path/to/ade/repository
$ make -j

You can build library with hardened asserts via
Expand All @@ -59,7 +59,7 @@ input directly and doesn't read any files or sockets. If you want to
use this library to process any input from external source you must
validate it before doing any library calls.

To build documentation set `-DBUILD_DOCUMENTATION=ON`. Documentation
To build documentation set `-DBUILD_ADE_DOCUMENTATION=ON`. Documentation
can be found in `./doc` directory. Doxygen is required.

## Support
Expand Down
2 changes: 1 addition & 1 deletion sources/ade/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if(FORCE_ADE_ASSERTS)
target_compile_definitions( ${PROJECT_NAME} PUBLIC FORCE_ADE_ASSERTS )
endif()

if(BUILD_DOCUMENTATION)
if(BUILD_ADE_DOCUMENTATION)
find_package(Doxygen REQUIRED)

set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ std::function<void()> CallbackConnector<Args...>::finalize()
}
}
ADE_ASSERT(nullptr != m_producerCallback);
return std::move(resetter);
return resetter;
}

template<typename... Args>
Expand Down
8 changes: 5 additions & 3 deletions sources/ade/source/alloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "ade/memory/alloc.hpp"

#ifdef WIN32
#if defined(WIN32) || defined(__ANDROID__) || defined(ANDROID)
#include <malloc.h>
#else
#include <algorithm>
Expand All @@ -22,8 +22,10 @@ namespace ade
void* aligned_alloc(std::size_t size, std::size_t alignment)
{
ADE_ASSERT(util::is_pow2(alignment));
#ifdef WIN32
#if defined(WIN32)
return _aligned_malloc(size, alignment);
#elif defined(__ANDROID__) || defined(ANDROID)
return memalign(alignment, size);
#else
void* ret = nullptr;
auto res = posix_memalign(&ret, std::max(sizeof(void*), alignment), size);
Expand All @@ -34,7 +36,7 @@ void* aligned_alloc(std::size_t size, std::size_t alignment)

void aligned_free(void* ptr)
{
#ifdef WIN32
#if defined(WIN32)
return _aligned_free(ptr);
#else
return free(ptr);
Expand Down
1 change: 1 addition & 0 deletions sources/ade/source/subgraphs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ void findPaths(const NodeHandle& src, const NodeHandle& dst,
const std::vector<NodeHandle>& path,
const NodeHandle& prev, const NodeHandle& next)
{
ADE_UNUSED(prev);
ADE_ASSERT(nullptr != prev);
ADE_ASSERT(nullptr != next);
if (next == dst)
Expand Down

0 comments on commit b9ff797

Please sign in to comment.