[Rinside-commits] r248 - in pkg: . inst/examples/armadillo/cmake inst/examples/eigen/cmake

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Aug 19 22:02:11 CEST 2012


Author: edd
Date: 2012-08-19 22:02:11 +0200 (Sun, 19 Aug 2012)
New Revision: 248

Modified:
   pkg/ChangeLog
   pkg/inst/examples/armadillo/cmake/CMakeLists.txt
   pkg/inst/examples/eigen/cmake/CMakeLists.txt
Log:
another patch by Peter to allow CMake windows builds against arma + eigen


Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog	2012-08-14 00:08:46 UTC (rev 247)
+++ pkg/ChangeLog	2012-08-19 20:02:11 UTC (rev 248)
@@ -1,3 +1,9 @@
+2012-08-19  Dirk Eddelbuettel  <edd at debian.org>
+
+	* inst/examples/eigen/cmake/CMakeLists.txt: Added a second patch by
+	Peter to support compilation on Windows
+	* inst/examples/armadillo/cmake/CMakeLists.txt: idem
+
 2012-08-13  Dirk Eddelbuettel  <edd at debian.org>
 
 	* inst/examples/eigen/cmake/CMakeLists.txt: Added Peter's patch

Modified: pkg/inst/examples/armadillo/cmake/CMakeLists.txt
===================================================================
--- pkg/inst/examples/armadillo/cmake/CMakeLists.txt	2012-08-14 00:08:46 UTC (rev 247)
+++ pkg/inst/examples/armadillo/cmake/CMakeLists.txt	2012-08-19 20:02:11 UTC (rev 248)
@@ -90,6 +90,11 @@
     string(SUBSTRING ${RINSIDELIBS} ${RLibPathLen} -1 RINSIDELIBS_l)
 
     link_directories(${RINSIDELIBS_L})
+	
+	set ( BLAS_LIBS ${CMAKE_CURRENT_SOURCE_DIR}/libblas.lib)
+	set ( LAPACK_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/liblapack.lib)
+	link_directories(${CMAKE_CURRENT_SOURCE_DIR})
+
 else()	
     if (${RCPPLIBS} MATCHES "[-][L]([^ ;])+")
         string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RCPPLIBS_L)
@@ -115,6 +120,8 @@
     FIND_LIBRARY(BLAS_LIBRARY blas)
     SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SAVED}) # Restore
     LIST(APPEND EXTRA_LIBRARIES ${BLAS_LIBRARY})
+
+    FIND_LIBRARY(LAPACK_LIBRARY lapack)
 endif()
 
 execute_process(COMMAND R CMD config CXXFLAGS
@@ -126,9 +133,6 @@
 execute_process(COMMAND R CMD config LAPACK_LIBS
                 OUTPUT_VARIABLE RLAPACK)
 
-
-FIND_LIBRARY(LAPACK_LIBRARY lapack)
-
 set(CMAKE_CXX_FLAGS "-W -Wall -pedantic -Wextra ${CMAKE_CXX_FLAGS}")
 
 if (CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR
@@ -138,6 +142,8 @@
     add_definitions("-O3")
 endif()
 
+message ("cmake_cxx_flags" ${CMAKE_CXX_FLAGS})
+
 foreach (next_SOURCE ${sources})
    get_filename_component(source_name ${next_SOURCE} NAME_WE)
    add_executable( ${source_name} ${next_SOURCE} )
@@ -148,5 +154,7 @@
    target_link_libraries(${source_name} ${RINSIDELIBS_l})
    target_link_libraries(${source_name} ${RCPPLIBS_l})
    target_link_libraries(${source_name} ${EXTRA_LIBRARIES})
+
    target_link_libraries(${source_name} ${LAPACK_LIBRARY})
+   
 endforeach (next_SOURCE ${sources})

Modified: pkg/inst/examples/eigen/cmake/CMakeLists.txt
===================================================================
--- pkg/inst/examples/eigen/cmake/CMakeLists.txt	2012-08-14 00:08:46 UTC (rev 247)
+++ pkg/inst/examples/eigen/cmake/CMakeLists.txt	2012-08-19 20:02:11 UTC (rev 248)
@@ -85,6 +85,10 @@
     string(SUBSTRING ${RINSIDELIBS} ${RLibPathLen} -1 RINSIDELIBS_l)
 
     link_directories(${RINSIDELIBS_L})
+	
+	set ( BLAS_LIBS ${CMAKE_CURRENT_SOURCE_DIR}/libblas.lib)
+	set ( LAPACK_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/liblapack.lib)
+	link_directories(${CMAKE_CURRENT_SOURCE_DIR})
 else()	
     if (${RCPPLIBS} MATCHES "[-][L]([^ ;])+")
         string(SUBSTRING ${CMAKE_MATCH_0} ${NUM_TRUNC_CHARS} -1 RCPPLIBS_L)



More information about the Rinside-commits mailing list