From dcbf104bccec39e955ab84c76bf1d96beaa31aa1 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Wed, 27 Jan 2010 07:48:48 -0500 Subject: [PATCH] add EIGEN_DEFAULT_TO_ROW_MAJOR cmake option for the tests. --- cmake/EigenTesting.cmake | 6 ++++++ test/CMakeLists.txt | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/cmake/EigenTesting.cmake b/cmake/EigenTesting.cmake index 4d02a470a..8830eef4e 100644 --- a/cmake/EigenTesting.cmake +++ b/cmake/EigenTesting.cmake @@ -148,6 +148,12 @@ macro(ei_testing_print_summary) message("Enabled backends: ${EIGEN_TESTED_BACKENDS}") message("Disabled backends: ${EIGEN_MISSING_BACKENDS}") + if(EIGEN_DEFAULT_TO_ROW_MAJOR) + message("Default order: Row-major") + else() + message("Default order: Column-major") + endif() + if(EIGEN_TEST_SSE2) message("SSE2: ON") else() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6dd0d6916..1177db797 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -5,6 +5,11 @@ add_dependencies(check buildtests) option(EIGEN_SPLIT_LARGE_TESTS "Split large tests into smaller executables" ON) +option(EIGEN_DEFAULT_TO_ROW_MAJOR "Use row-major as default matrix storage order" OFF) +if(EIGEN_DEFAULT_TO_ROW_MAJOR) + add_definitions("-DEIGEN_DEFAULT_TO_ROW_MAJOR") +endif() + find_package(GSL) if(GSL_FOUND AND GSL_VERSION_MINOR LESS 9) set(GSL_FOUND "")