Skip to content

Commit

Permalink
Add DEV options for CMake + Update README for enabling developer-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ccharly committed Jul 1, 2016
1 parent c154a93 commit d197b36
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 21 deletions.
49 changes: 28 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ include(cmake/ns/ns.cmake)

## Potential warnings fixup
## -------------------------------------------------------------------------------------------------
NS_ignore(${DEV})
NS_ignore(${IS_TRAVIS_CI})
NS_ignore(${USE_SELF_BOOST})

Expand Down Expand Up @@ -63,14 +64,16 @@ set(NS_CMAKE_PROJECT_OPTIONS
CMAKE_ARGS "-DBOOST_ROOT=${Boost_INCLUDE_DIRS}"
)

set(NS_BENCH_GIT_TAG develop)
NS_project_include(ns.bench.standalone)
NS_project_include(brigand.standalone)
NS_project_include(stf.standalone)
if (DEFINED DEV)
set(NS_BENCH_GIT_TAG develop)
NS_project_include(ns.bench.standalone)
NS_project_include(brigand.standalone)
NS_project_include(stf.standalone)
endif()

## Compute version string and mode + Documentation
## -------------------------------------------------------------------------------------------------
if (NOT DEFINED IS_TRAVIS_CI)
if (DEFINED DEV AND NOT DEFINED IS_TRAVIS_CI)
NS_include(parse_revision)
NS_include(doc/doxygen)
endif()
Expand All @@ -94,20 +97,24 @@ include_directories(

## Setup Unit/Bench & Coverage Test
## -------------------------------------------------------------------------------------------------
include(./setup.cmake) # Import compiler specific setup
include(CTest)
add_custom_target(tests)
add_custom_target(unit)
add_dependencies(tests unit)
add_subdirectory(test)

add_custom_target(bench)
add_subdirectory(bench)

add_custom_target(exhaustive)
add_subdirectory(exhaustive)

if (NOT DEFINED IS_TRAVIS_CI)
NS_include(coverage)
enable_coverage(boost.simd)
if (DEFINED DEV)
include(./setup.cmake) # Import compiler specific setup

include(CTest)
add_custom_target(tests)
add_custom_target(unit)
add_dependencies(tests unit)
add_subdirectory(test)

add_custom_target(bench)
add_subdirectory(bench)

add_custom_target(exhaustive)
add_subdirectory(exhaustive)

if (NOT DEFINED IS_TRAVIS_CI)
NS_include(coverage)
enable_coverage(boost.simd)
endif()
endif()

16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ Portable SIMD computation library - To be proposed as a Boost library
| Linux clang & g++ | [![Build Status](https://travis-ci.org/NumScale/boost.simd.png?branch=master)](https://travis-ci.org/NumScale/boost.simd) | [![Build Status](https://travis-ci.org/NumScale/boost.simd.png?branch=develop)](https://travis-ci.org/NumScale/boost.simd) |
| OS X clang | [![Build Status](https://travis-ci.org/NumScale/boost.simd.png?branch=master)](https://travis-ci.org/NumScale/boost.simd) | [![Build Status](https://travis-ci.org/NumScale/boost.simd.png?branch=develop)](https://travis-ci.org/NumScale/boost.simd) |

## Getting started with developer mode

The project requires external dependencies to compile its benchmarks as well as its unit tests. To
do so, you have to explicitly enable a cmake options to enable automatic retrieving of those
dependencies:
```
cmake -DDEV= <location-of-CMakeLists.txt>
```

The developer mode includes the following features:
- Documentation
- Automatic generation of project version
- Benchmarks
- Unit tests (including exhaustive tests)
- Automatic update of brigand (dependency)

## Getting started with the build process (on linux)

NOTE:
Expand Down

0 comments on commit d197b36

Please sign in to comment.