<div dir="ltr"><div><div>Dear list,<br><br></div>I am working on a project in C++ where I have to use Bayesian Statistics quite extensively. I coded my own Metropolis Hasting Sampler but since it is not working that well, I wanted to call rstan from within C++ via RInside. I already wrote the appropriate RInside/Rcpp code but I don't know how to rewrite my CMakeLists.txt file to make it work.<br><br></div><div>I looked at the CMakelists.txt file in the standard/examples folder but I don't know enough about cmake to rewrite it for my own project.<br><br></div><div>My project consists of 3 source files and 2 header files and I am working with Eclipse Mars. Here is my current file:<br><br><i>cmake_minimum_required(VERSION 2.6)<br><br>project(XX)<br><br># use C++11<br>set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")<br><br>add_executable(${PROJECT_NAME}<br>  global.h<br>  model.h<br>  model.cpp<br>  run.cpp<br>  mcmc.h<br>  mcmc.cpp<br>  )<br><br></i></div><div>What do I have to change (in the file or in Eclipse itself) to make it work?<i><br></i></div><div><i><br></i></div><div>Thanks in advance for your help<br></div><div>Ulf<br></div></div>