Commit 5bee6ddf authored by Nicolas Mellado's avatar Nicolas Mellado

Add cmake compilation systems for examples

parent 4a018bd1
......@@ -35,3 +35,10 @@ if(DOXYGEN_FOUND)
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif(DOXYGEN_FOUND)
################################################################################
# tests and examples #
################################################################################
add_subdirectory(examples EXCLUDE_FROM_ALL)
project(PatateExamples)
if(DEFINED ENV{EIGEN3_INCLUDE_DIR})
include_directories ( "$ENV{EIGEN3_INCLUDE_DIR}" )
else()
message("Warning: You need to set an environment variable EIGEN3_INCLUDE_DIR to be able to compile examples with your/path/to/Eigen")
endif()
include_directories(${CMAKE_SOURCE_DIR})
add_custom_target(examples)
add_subdirectory(cpp)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
################################################################################
# Grenaille #
################################################################################
set(grenaille_basic_SRCS
grenaille_basic_cpu.cpp
)
add_executable(grenaille_basic_cpu ${grenaille_basic_SRCS})
add_dependencies(examples grenaille_basic_cpu)
......@@ -10,8 +10,6 @@
\brief very brief file description
\author: Nicolas Mellado
Compile command:
$ g++ grenaille_basic_cpu.cpp -I ../.. -I /path/to/Eigen/
*/
#include <cmath>
#include <algorithm>
......
......@@ -4,6 +4,8 @@
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
1. How to use Patate
********************
You don't need to compile this library to use it. Simply add the Patate/
......@@ -12,9 +14,9 @@ directly the top-level include files you can find in the Patate/ directory.
2. Documentation and examples
*****************************
Use Cmake to build the documentation, some examples and tests.
2. Documentation
****************
Please use Cmake to build the documentation.
You need to create a build directory an launch CMake from it:
cd build
cmake source_dir
......@@ -29,7 +31,23 @@ http://patate.gforge.inria.fr/html/
3. Links and Licence
3. Examples
***********
Please use Cmake to build the documentation. You need to indicate where are
located the Eigen (or Eigen-nvcc) headers, by setting the environment variable
EIGEN3_INCLUDE_DIR to your/path/to/Eigen.
Then compile the examples from the build dir
cd build
make examples
The generated binaries will be generated in
build/examples
and subfolders
4. Links and Licence
********************
Patate Lib Official website: https://gforge.inria.fr/projects/patate/
Licence: MTL
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment