[Rinside-commits] r224 - in pkg: . inst inst/examples/mpi inst/examples/mpi/cmake inst/examples/qt inst/examples/qt/cmake inst/examples/standard inst/examples/standard/cmake inst/examples/wt inst/examples/wt/cmake

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jan 8 19:09:43 CET 2012


Author: edd
Date: 2012-01-08 19:09:43 +0100 (Sun, 08 Jan 2012)
New Revision: 224

Added:
   pkg/inst/examples/mpi/cmake/
   pkg/inst/examples/mpi/cmake/CMakeLists.txt
   pkg/inst/examples/qt/cmake/
   pkg/inst/examples/qt/cmake/CMakeLists.txt
   pkg/inst/examples/standard/cmake/
   pkg/inst/examples/standard/cmake/CMakeLists.txt
   pkg/inst/examples/wt/cmake/
   pkg/inst/examples/wt/cmake/CMakeLists.txt
Modified:
   pkg/ChangeLog
   pkg/inst/NEWS
   pkg/inst/THANKS
Log:


Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog	2012-01-08 17:44:10 UTC (rev 223)
+++ pkg/ChangeLog	2012-01-08 18:09:43 UTC (rev 224)
@@ -1,4 +1,4 @@
-2012-01-08  Dirk Eddelbuettel  <edd at dexter>
+2012-01-08  Dirk Eddelbuettel  <edd at debian.org>
 
 	* src/RInside.cpp: Correct console writer on Windows to not use
 	Rprintf (with thanks to both James Bates and John Brzustowski)
@@ -6,6 +6,10 @@
 	* src/RInside.cpp: Update RNG seeding to same scheme now used by
 	R which blends both (millisecond) time and process id
 
+	* inst/examples/*: Added CMake build support for all example
+	directories kindly provided by Peter Aberline; this helps when coding
+	inside of IDEs such as Eclipse, KDevelop or Code::Blocks
+
 	* inst/examples/standard/Makefile.win: Allow for an R_ARCH variable
 	to be set to enforce either i386 or x64 builds
 

Modified: pkg/inst/NEWS
===================================================================
--- pkg/inst/NEWS	2012-01-08 17:44:10 UTC (rev 223)
+++ pkg/inst/NEWS	2012-01-08 18:09:43 UTC (rev 224)
@@ -1,15 +1,19 @@
 0.2.6   2012-01-xx
 
-   o    Correct Windows initialization by not using Rprintf in internasl
+   o    Correct Windows initialization by not using Rprintf in internal
         console writer, with thanks to both James Bates and John Brzustowski
 
    o    Update RNG seeding (used by tmpnam et al) to same scheme used by
         R since 2.14.0: blending both millisecond time and process id
 
+   o    Added CMake build support for all four example directories as kindly 
+   	provided by Peter Aberline; this helps when writing RInside code
+	inside of IDEs such as Eclipse, KDevelop or Code::Blocks
+
    o    Small update to standard examples Makefile for Windows permitting 
         to explicitly set i386 or x64 as a build architecture
 
-0.2.5   2011-12-06
+0.2.5   2011-12-07
 
    o    Applied (somewhat simplified) patch by James Bates which restores
         RInside to working on Windows -- with a big Thank You! to James for

Modified: pkg/inst/THANKS
===================================================================
--- pkg/inst/THANKS	2012-01-08 17:44:10 UTC (rev 223)
+++ pkg/inst/THANKS	2012-01-08 18:09:43 UTC (rev 224)
@@ -10,3 +10,4 @@
 Murray Stokely		for a patch regarding timing of Rcpp autoloads
 James Bates		for a patch restoring RInside on Windows
 John Brzustowski	for a correction to the Windows initialization
+Peter Aberline		for contributing CMake support for all examples

Added: pkg/inst/examples/mpi/cmake/CMakeLists.txt
===================================================================
--- pkg/inst/examples/mpi/cmake/CMakeLists.txt	                        (rev 0)
+++ pkg/inst/examples/mpi/cmake/CMakeLists.txt	2012-01-08 18:09:43 UTC (rev 224)
@@ -0,0 +1,98 @@
+cmake_minimum_required(VERSION 2.8.4) 
+
+set (SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
+
+execute_process(COMMAND R RHOME
+                OUTPUT_VARIABLE R_HOME)
+
+find_package(MPI REQUIRED)
+set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS})
+set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS})
+include_directories(${MPI_INCLUDE_PATH})
+
+file(GLOB sources ${SRC_DIR}/*.cpp)
+
+set(NUM_TRUNC_CHARS 2)
+
+execute_process(COMMAND R CMD config --cppflags
+                OUTPUT_VARIABLE RCPPFLAGS)
+string(SUBSTRING ${RCPPFLAGS} ${NUM_TRUNC_CHARS} -1 RCPPFLAGS)
+include_directories(${RCPPFLAGS})
+
+execute_process(COMMAND R CMD config --ldflags
+                OUTPUT_VARIABLE RLDFLAGS)
+string(LENGTH ${RLDFLAGS} RLDFLAGS_LEN)
+
+if (${RLDFLAGS} MATCHES "[-][L]([^ ;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RLDFLAGS_L)
+    string(STRIP ${RLDFLAGS_L} RLDFLAGS_L )
+    link_directories(${RLDFLAGS_L} )
+endif()
+
+if (${RLDFLAGS} MATCHES "[-][l]([^;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RLDFLAGS_l)
+    string(STRIP ${RLDFLAGS_l} RLDFLAGS_l )
+endif()
+
+execute_process(COMMAND Rscript -e "Rcpp:::CxxFlags()"
+                OUTPUT_VARIABLE RCPPINCL)
+string(SUBSTRING ${RCPPINCL} ${NUM_TRUNC_CHARS} -1 RCPPINCL)
+include_directories(${RCPPINCL})
+
+execute_process(COMMAND Rscript -e "Rcpp:::LdFlags()"
+                OUTPUT_VARIABLE RCPPLIBS)
+if (${RCPPLIBS} MATCHES "[-][L]([^ ;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RCPPLIBS_L)
+    link_directories(${RCPPLIBS_L} )
+endif()
+
+if (${RCPPLIBS} MATCHES "[-][l][R]([^;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RCPPLIBS_l)
+endif()
+
+execute_process(COMMAND Rscript -e "RInside:::CxxFlags()"
+                OUTPUT_VARIABLE RINSIDEINCL)
+string(SUBSTRING ${RINSIDEINCL} ${NUM_TRUNC_CHARS} -1 RINSIDEINCL)
+include_directories(${RINSIDEINCL})
+
+execute_process(COMMAND Rscript -e "RInside:::LdFlags()"
+                OUTPUT_VARIABLE RINSIDELIBS)
+if (${RINSIDELIBS} MATCHES "[-][L]([^ ;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RINSIDELIBS_L)
+    link_directories(${RINSIDELIBS_L})
+endif()
+
+if (${RINSIDELIBS} MATCHES "[-][l][R]([^;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RINSIDELIBS_l)
+endif()
+
+execute_process(COMMAND R CMD config CXXFLAGS
+                OUTPUT_VARIABLE RCXXFLAGS)
+
+execute_process(COMMAND R CMD config BLAS_LIBS
+                OUTPUT_VARIABLE RBLAS)
+
+execute_process(COMMAND R CMD config LAPACK_LIBS
+                OUTPUT_VARIABLE RLAPACK)
+
+set(CMAKE_CXX_FLAGS "-W -Wall -pedantic -Wextra ${CMAKE_CXX_FLAGS}")
+
+if (CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR
+    CMAKE_BUILD_TYPE STREQUAL "RelWithDebugInfo" )
+    add_definitions("-DDEBUG")
+elseif ( CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
+    add_definitions("-O3")
+endif()
+
+foreach (next_SOURCE ${sources})
+   get_filename_component(source_name ${next_SOURCE} NAME_WE)
+   add_executable( ${source_name} ${next_SOURCE} )
+
+   target_link_libraries(${source_name} ${RCPPLIBS_l})
+   target_link_libraries(${source_name} ${RINSIDELIBS_l})
+   target_link_libraries(${source_name} ${RLDFLAGS_l})
+   target_link_libraries(${source_name} ${BLAS_LIBS})
+   target_link_libraries(${source_name} ${LAPACK_LIBS})
+   target_link_libraries(${source_name} ${MPI_LIBRARIES})
+endforeach (next_SOURCE ${sources})
+

Added: pkg/inst/examples/qt/cmake/CMakeLists.txt
===================================================================
--- pkg/inst/examples/qt/cmake/CMakeLists.txt	                        (rev 0)
+++ pkg/inst/examples/qt/cmake/CMakeLists.txt	2012-01-08 18:09:43 UTC (rev 224)
@@ -0,0 +1,105 @@
+cmake_minimum_required(VERSION 2.8.4) 
+
+project(qtdensitydemo)
+find_package(Qt4 REQUIRED) # find and setup Qt4 for this project
+
+set(CMAKE_VERBOSE_MAKEFILE 0)
+
+set(QT_USE_QTSVG 1)
+
+add_definitions(${QT_DEFINITIONS})
+add_definitions(-DQT_DLL)
+include(${QT_USE_FILE})
+include_directories(${QT_INCLUDE_DIR})
+link_directories(${QT_LIBRARY_DIR})
+
+execute_process(COMMAND R RHOME
+                OUTPUT_VARIABLE R_HOME)
+
+set(sources ../main.cpp
+            ../qtdensity.cpp)
+             
+set(headers ../qtdensity.h)
+qt4_wrap_cpp(sources ${headers})
+
+set(NUM_TRUNC_CHARS 2)
+
+execute_process(COMMAND R CMD config --cppflags
+                OUTPUT_VARIABLE RCPPFLAGS)
+string(SUBSTRING ${RCPPFLAGS} ${NUM_TRUNC_CHARS} -1 RCPPFLAGS)
+include_directories(${RCPPFLAGS})
+
+execute_process(COMMAND R CMD config --ldflags
+                OUTPUT_VARIABLE RLDFLAGS)
+string(LENGTH ${RLDFLAGS} RLDFLAGS_LEN)
+
+if (${RLDFLAGS} MATCHES "[-][L]([^ ;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RLDFLAGS_L)
+    string(STRIP ${RLDFLAGS_L} RLDFLAGS_L )
+    link_directories(${RLDFLAGS_L})
+endif()
+
+if (${RLDFLAGS} MATCHES "[-][l]([^;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RLDFLAGS_l)
+    string(STRIP ${RLDFLAGS_l} RLDFLAGS_l )
+endif()
+
+execute_process(COMMAND Rscript -e "Rcpp:::CxxFlags()"
+                OUTPUT_VARIABLE RCPPINCL)
+string(SUBSTRING ${RCPPINCL} ${NUM_TRUNC_CHARS} -1 RCPPINCL)
+include_directories(${RCPPINCL})
+
+execute_process(COMMAND Rscript -e "Rcpp:::LdFlags()"
+                OUTPUT_VARIABLE RCPPLIBS)
+if (${RCPPLIBS} MATCHES "[-][L]([^ ;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RCPPLIBS_L)
+    link_directories(${RCPPLIBS_L} )
+endif()
+
+if (${RCPPLIBS} MATCHES "[-][l][R]([^;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RCPPLIBS_l)
+endif()
+
+execute_process(COMMAND Rscript -e "RInside:::CxxFlags()"
+                OUTPUT_VARIABLE RINSIDEINCL)
+string(SUBSTRING ${RINSIDEINCL} ${NUM_TRUNC_CHARS} -1 RINSIDEINCL)
+include_directories(${RINSIDEINCL})
+
+execute_process(COMMAND Rscript -e "RInside:::LdFlags()"
+                OUTPUT_VARIABLE RINSIDELIBS)
+if (${RINSIDELIBS} MATCHES "[-][L]([^ ;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RINSIDELIBS_L)
+    link_directories(${RINSIDELIBS_L})
+endif()
+
+if (${RINSIDELIBS} MATCHES "[-][l][R]([^;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RINSIDELIBS_l)
+endif()
+
+execute_process(COMMAND R CMD config CXXFLAGS
+                OUTPUT_VARIABLE RCXXFLAGS)
+
+execute_process(COMMAND R CMD config BLAS_LIBS
+                OUTPUT_VARIABLE RBLAS)
+
+execute_process(COMMAND R CMD config LAPACK_LIBS
+                OUTPUT_VARIABLE RLAPACK)
+
+set(CMAKE_CXX_FLAGS "-W -Wall -pedantic -Wextra ${CMAKE_CXX_FLAGS}")
+
+if (CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR
+    CMAKE_BUILD_TYPE STREQUAL "RelWithDebugInfo" )
+    add_definitions("-DDEBUG")
+elseif ( CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
+    add_definitions("-O3")
+endif()
+
+add_executable(qtdensitydemo ${sources} ${headers} )
+
+target_link_libraries(qtdensitydemo ${BLAS_LIBS})
+target_link_libraries(qtdensitydemo ${LAPACK_LIBS})
+target_link_libraries(qtdensitydemo ${QT_LIBRARIES})
+target_link_libraries(qtdensitydemo ${RCPPLIBS_l})
+target_link_libraries(qtdensitydemo ${RINSIDELIBS_l})
+target_link_libraries(qtdensitydemo ${RLDFLAGS_l})
+

Added: pkg/inst/examples/standard/cmake/CMakeLists.txt
===================================================================
--- pkg/inst/examples/standard/cmake/CMakeLists.txt	                        (rev 0)
+++ pkg/inst/examples/standard/cmake/CMakeLists.txt	2012-01-08 18:09:43 UTC (rev 224)
@@ -0,0 +1,92 @@
+cmake_minimum_required(VERSION 2.8.4) 
+
+set (SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
+
+execute_process(COMMAND R RHOME
+                OUTPUT_VARIABLE R_HOME)
+
+file(GLOB sources ${SRC_DIR}/*.cpp)
+
+set(NUM_TRUNC_CHARS 2)
+
+execute_process(COMMAND R CMD config --cppflags
+                OUTPUT_VARIABLE RCPPFLAGS)
+string(SUBSTRING ${RCPPFLAGS} ${NUM_TRUNC_CHARS} -1 RCPPFLAGS)
+include_directories(${RCPPFLAGS})
+
+execute_process(COMMAND R CMD config --ldflags
+                OUTPUT_VARIABLE RLDFLAGS)
+string(LENGTH ${RLDFLAGS} RLDFLAGS_LEN)
+
+if (${RLDFLAGS} MATCHES "[-][L]([^ ;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RLDFLAGS_L)
+    string(STRIP ${RLDFLAGS_L} RLDFLAGS_L )
+    link_directories(${RLDFLAGS_L} )
+endif()
+
+if (${RLDFLAGS} MATCHES "[-][l]([^;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RLDFLAGS_l)
+    string(STRIP ${RLDFLAGS_l} RLDFLAGS_l )
+endif()
+
+execute_process(COMMAND Rscript -e "Rcpp:::CxxFlags()"
+                OUTPUT_VARIABLE RCPPINCL)
+string(SUBSTRING ${RCPPINCL} ${NUM_TRUNC_CHARS} -1 RCPPINCL)
+include_directories(${RCPPINCL})
+
+execute_process(COMMAND Rscript -e "Rcpp:::LdFlags()"
+                OUTPUT_VARIABLE RCPPLIBS)
+if (${RCPPLIBS} MATCHES "[-][L]([^ ;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RCPPLIBS_L)
+    link_directories(${RCPPLIBS_L} )
+endif()
+
+if (${RCPPLIBS} MATCHES "[-][l][R]([^;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RCPPLIBS_l)
+endif()
+
+execute_process(COMMAND Rscript -e "RInside:::CxxFlags()"
+                OUTPUT_VARIABLE RINSIDEINCL)
+string(SUBSTRING ${RINSIDEINCL} ${NUM_TRUNC_CHARS} -1 RINSIDEINCL)
+include_directories(${RINSIDEINCL})
+
+execute_process(COMMAND Rscript -e "RInside:::LdFlags()"
+                OUTPUT_VARIABLE RINSIDELIBS)
+if (${RINSIDELIBS} MATCHES "[-][L]([^ ;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RINSIDELIBS_L)
+    link_directories(${RINSIDELIBS_L})
+endif()
+
+if (${RINSIDELIBS} MATCHES "[-][l][R]([^;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RINSIDELIBS_l)
+endif()
+
+execute_process(COMMAND R CMD config CXXFLAGS
+                OUTPUT_VARIABLE RCXXFLAGS)
+
+execute_process(COMMAND R CMD config BLAS_LIBS
+                OUTPUT_VARIABLE RBLAS)
+
+execute_process(COMMAND R CMD config LAPACK_LIBS
+                OUTPUT_VARIABLE RLAPACK)
+
+set(CMAKE_CXX_FLAGS "-W -Wall -pedantic -Wextra ${CMAKE_CXX_FLAGS}")
+
+if (CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR
+    CMAKE_BUILD_TYPE STREQUAL "RelWithDebugInfo" )
+    add_definitions("-DDEBUG")
+elseif ( CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
+    add_definitions("-O3")
+endif()
+
+foreach (next_SOURCE ${sources})
+   get_filename_component(source_name ${next_SOURCE} NAME_WE)
+   add_executable( ${source_name} ${next_SOURCE} )
+
+   target_link_libraries(${source_name} ${RCPPLIBS_l})
+   target_link_libraries(${source_name} ${RINSIDELIBS_l})
+   target_link_libraries(${source_name} ${RLDFLAGS_l})
+   target_link_libraries(${source_name} ${BLAS_LIBS})
+   target_link_libraries(${source_name} ${LAPACK_LIBS})
+endforeach (next_SOURCE ${sources})
+

Added: pkg/inst/examples/wt/cmake/CMakeLists.txt
===================================================================
--- pkg/inst/examples/wt/cmake/CMakeLists.txt	                        (rev 0)
+++ pkg/inst/examples/wt/cmake/CMakeLists.txt	2012-01-08 18:09:43 UTC (rev 224)
@@ -0,0 +1,95 @@
+cmake_minimum_required(VERSION 2.8.4) 
+
+set (SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
+
+execute_process(COMMAND R RHOME
+                OUTPUT_VARIABLE R_HOME)
+
+file(GLOB sources ${SRC_DIR}/*.cpp)
+
+set(NUM_TRUNC_CHARS 2)
+
+execute_process(COMMAND R CMD config --cppflags
+                OUTPUT_VARIABLE RCPPFLAGS)
+string(SUBSTRING ${RCPPFLAGS} ${NUM_TRUNC_CHARS} -1 RCPPFLAGS)
+include_directories(${RCPPFLAGS})
+
+execute_process(COMMAND R CMD config --ldflags
+                OUTPUT_VARIABLE RLDFLAGS)
+string(LENGTH ${RLDFLAGS} RLDFLAGS_LEN)
+
+if (${RLDFLAGS} MATCHES "[-][L]([^ ;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RLDFLAGS_L)
+    string(STRIP ${RLDFLAGS_L} RLDFLAGS_L )
+    link_directories(${RLDFLAGS_L} )
+endif()
+
+if (${RLDFLAGS} MATCHES "[-][l]([^;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RLDFLAGS_l)
+    string(STRIP ${RLDFLAGS_l} RLDFLAGS_l )
+endif()
+
+execute_process(COMMAND Rscript -e "Rcpp:::CxxFlags()"
+                OUTPUT_VARIABLE RCPPINCL)
+string(SUBSTRING ${RCPPINCL} ${NUM_TRUNC_CHARS} -1 RCPPINCL)
+include_directories(${RCPPINCL})
+
+execute_process(COMMAND Rscript -e "Rcpp:::LdFlags()"
+                OUTPUT_VARIABLE RCPPLIBS)
+if (${RCPPLIBS} MATCHES "[-][L]([^ ;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RCPPLIBS_L)
+    link_directories(${RCPPLIBS_L} )
+endif()
+
+if (${RCPPLIBS} MATCHES "[-][l][R]([^;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RCPPLIBS_l)
+endif()
+
+execute_process(COMMAND Rscript -e "RInside:::CxxFlags()"
+                OUTPUT_VARIABLE RINSIDEINCL)
+string(SUBSTRING ${RINSIDEINCL} ${NUM_TRUNC_CHARS} -1 RINSIDEINCL)
+include_directories(${RINSIDEINCL})
+
+execute_process(COMMAND Rscript -e "RInside:::LdFlags()"
+                OUTPUT_VARIABLE RINSIDELIBS)
+if (${RINSIDELIBS} MATCHES "[-][L]([^ ;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RINSIDELIBS_L)
+    link_directories(${RINSIDELIBS_L})
+endif()
+
+if (${RINSIDELIBS} MATCHES "[-][l][R]([^;])+")
+    string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RINSIDELIBS_l)
+endif()
+
+execute_process(COMMAND R CMD config CXXFLAGS
+                OUTPUT_VARIABLE RCXXFLAGS)
+
+execute_process(COMMAND R CMD config BLAS_LIBS
+                OUTPUT_VARIABLE RBLAS)
+
+execute_process(COMMAND R CMD config LAPACK_LIBS
+                OUTPUT_VARIABLE RLAPACK)
+
+set(CMAKE_CXX_FLAGS "-W -Wall -pedantic -Wextra ${CMAKE_CXX_FLAGS}")
+
+if (CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR
+    CMAKE_BUILD_TYPE STREQUAL "RelWithDebugInfo" )
+    add_definitions("-DDEBUG")
+elseif ( CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
+    add_definitions("-O3")
+endif()
+
+foreach (next_SOURCE ${sources})
+   get_filename_component(source_name ${next_SOURCE} NAME_WE)
+   add_executable( ${source_name} ${next_SOURCE} )
+
+   target_link_libraries(${source_name} ${RCPPLIBS_l})
+   target_link_libraries(${source_name} ${RINSIDELIBS_l})
+   target_link_libraries(${source_name} ${RLDFLAGS_l})
+   target_link_libraries(${source_name} ${BLAS_LIBS})
+   target_link_libraries(${source_name} ${LAPACK_LIBS})
+   target_link_libraries(${source_name} "wt")
+   target_link_libraries(${source_name} "wthttp")
+   target_link_libraries(${source_name} "boost_signals")
+endforeach (next_SOURCE ${sources})
+



More information about the Rinside-commits mailing list