aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/btl/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-07-09 14:04:48 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-07-09 14:04:48 +0000
commit28539e7597c643dbc2b8d4f49dd16bd86fb7251f (patch)
tree3bfb96ae898f0afc943a388edcc83c27d28d5b3a /bench/btl/CMakeLists.txt
parent5f55ab524cf0aad34dd6884bcae09eaa6c43c247 (diff)
imported a reworked version of BTL (Benchmark for Templated Libraries).
the modifications to initial code follow: * changed build system from plain makefiles to cmake * added eigen2 (4 versions: vec/novec and fixed/dynamic), GMM++, MTL4 interfaces * added "transposed matrix * vector" product action * updated blitz interface to use condensed products instead of hand coded loops * removed some deprecated interfaces * changed default storage order to column major for all libraries * new generic bench timer strategy which is supposed to be more accurate * various code clean-up
Diffstat (limited to 'bench/btl/CMakeLists.txt')
-rw-r--r--bench/btl/CMakeLists.txt74
1 files changed, 74 insertions, 0 deletions
diff --git a/bench/btl/CMakeLists.txt b/bench/btl/CMakeLists.txt
new file mode 100644
index 000000000..adcb62a52
--- /dev/null
+++ b/bench/btl/CMakeLists.txt
@@ -0,0 +1,74 @@
+PROJECT(BTL)
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
+
+set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
+include(MacroOptionalAddSubdirectory)
+
+OPTION(BTL_NOVEC "Disable SSE/Altivec optimizations when possible" OFF)
+
+SET(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+IF(CMAKE_COMPILER_IS_GNUCXX)
+ SET(CMAKE_CXX_FLAGS "-g0 -O3 -DNDEBUG")
+ IF(NOT BTL_NOVEC)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
+ ELSE(NOT BTL_NOVEC)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DEIGEN_DONT_VECTORIZE")
+ ENDIF(NOT BTL_NOVEC)
+ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+
+include_directories(
+ ${PROJECT_SOURCE_DIR}/actions
+ ${PROJECT_SOURCE_DIR}/generic_bench
+ ${PROJECT_SOURCE_DIR}/generic_bench/utils
+ ${PROJECT_SOURCE_DIR}/libs/STL)
+
+
+MACRO(BTL_ADD_BENCH targetname)
+ ADD_EXECUTABLE(${ARGV})
+ ADD_TEST(${targetname} "${targetname}")
+ENDMACRO(BTL_ADD_BENCH)
+
+ENABLE_TESTING()
+
+# Eigen2
+find_package(Eigen2)
+if (EIGEN2_FOUND)
+ macro_optional_add_subdirectory(libs/eigen2 ON)
+endif (EIGEN2_FOUND)
+
+# GMM++
+find_package(GMM)
+if (GMM_FOUND)
+ macro_optional_add_subdirectory(libs/gmm ON)
+endif (GMM_FOUND)
+
+# Boost
+find_package(Boost)
+if (Boost_FOUND)
+ include_directories(${Boost_INCLUDE_DIRS})
+ macro_optional_add_subdirectory(libs/ublas ON)
+endif (Boost_FOUND)
+
+# blitz
+find_package(Blitz)
+if (BLITZ_FOUND)
+ macro_optional_add_subdirectory(libs/blitz ON)
+ macro_optional_add_subdirectory(libs/tiny_blitz ON)
+endif (BLITZ_FOUND)
+
+# cblas
+find_package(CBLAS)
+if (CBLAS_FOUND)
+ macro_optional_add_subdirectory(libs/C_BLAS ON)
+endif (CBLAS_FOUND)
+
+
+macro_optional_add_subdirectory(libs/f77 ON)
+macro_optional_add_subdirectory(libs/C ON)
+macro_optional_add_subdirectory(libs/STL ON)
+macro_optional_add_subdirectory(libs/STL_algo ON)
+
+add_subdirectory(data)
+