diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c2fddacc..8bc7d4754 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,11 +131,11 @@ add_subdirectory(doc EXCLUDE_FROM_ALL) include(CTest) enable_testing() # must be called from the root CMakeLists, see man page -if(EIGEN_CMAKE_RUN_FROM_CTEST) +if(EIGEN_LEAVE_TEST_IN_ALL_TARGET) add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest -else(EIGEN_CMAKE_RUN_FROM_CTEST) +else() add_subdirectory(test EXCLUDE_FROM_ALL) -endif(EIGEN_CMAKE_RUN_FROM_CTEST) +endif() add_subdirectory(unsupported) @@ -143,6 +143,8 @@ add_subdirectory(demos EXCLUDE_FROM_ALL) add_subdirectory(blas EXCLUDE_FROM_ALL) +add_subdirectory(scripts EXCLUDE_FROM_ALL) + # TODO: consider also replacing EIGEN_BUILD_BTL by a custom target "make btl"? if(EIGEN_BUILD_BTL) add_subdirectory(bench/btl EXCLUDE_FROM_ALL) @@ -155,16 +157,18 @@ message("Configured Eigen ${EIGEN_VERSION_NUMBER}") string(TOLOWER "${CMAKE_GENERATOR}" cmake_generator_tolower) if(cmake_generator_tolower MATCHES "makefile") - message("You can now do the following:") + message("Some things you can do now:") message("--------------+----------------------------------------------------------------") message("Command | Description") message("--------------+----------------------------------------------------------------") message("make install | Install to ${CMAKE_INSTALL_PREFIX}") message(" | * To change that: cmake . -DCMAKE_INSTALL_PREFIX=yourpath") - message("make btest | Build the unit tests") - message("make test | Build and run the unit tests (using CTest)") - message("make test_qr | Build a specific test, here test_qr.") - message("make blas | Build BLAS library (not the same thing as Eigen)") message("make doc | Generate the API documentation, requires Doxygen & LaTeX") + message("make blas | Build BLAS library (not the same thing as Eigen)") message("--------------+----------------------------------------------------------------") endif() + +message("") +message("To build/run the unit tests, read this page:") +message(" http://eigen.tuxfamily.org/index.php?title=Tests") +message("") \ No newline at end of file diff --git a/cmake/EigenTesting.cmake b/cmake/EigenTesting.cmake index 3850a1b11..8ed39738d 100644 --- a/cmake/EigenTesting.cmake +++ b/cmake/EigenTesting.cmake @@ -138,15 +138,12 @@ macro(ei_testing_print_summary) message("*** Eigen's unit tests configuration summary ***") message("************************************************************") message("") - message("Build type: ${CMAKE_BUILD_TYPE}") - message(" * To change that: cmake . -DCMAKE_BUILD_TYPE=type") - message(" * Available types are Debug and Release") - message("") + message("Build type: ${CMAKE_BUILD_TYPE}") get_property(EIGEN_TESTING_SUMMARY GLOBAL PROPERTY EIGEN_TESTING_SUMMARY) get_property(EIGEN_TESTED_BACKENDS GLOBAL PROPERTY EIGEN_TESTED_BACKENDS) get_property(EIGEN_MISSING_BACKENDS GLOBAL PROPERTY EIGEN_MISSING_BACKENDS) - message("Enabled backends: ${EIGEN_TESTED_BACKENDS}") - message("Disabled backends: ${EIGEN_MISSING_BACKENDS}") + message("Enabled backends: ${EIGEN_TESTED_BACKENDS}") + message("Disabled backends: ${EIGEN_MISSING_BACKENDS}") if(EIGEN_TEST_SSE2) message("SSE2: ON") diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt new file mode 100644 index 000000000..e373d3188 --- /dev/null +++ b/scripts/CMakeLists.txt @@ -0,0 +1,4 @@ +configure_file(maketests.in ${CMAKE_BINARY_DIR}/maketests) +configure_file(mctestr.in ${CMAKE_BINARY_DIR}/mctestr) +configure_file(debug.in ${CMAKE_BINARY_DIR}/debug) +configure_file(release.in ${CMAKE_BINARY_DIR}/release) diff --git a/scripts/debug.in b/scripts/debug.in new file mode 100755 index 000000000..d339d3d1f --- /dev/null +++ b/scripts/debug.in @@ -0,0 +1,3 @@ +#!/bin/sh + +cmake -DCMAKE_BUILD_TYPE=Debug . diff --git a/test/maketests.in b/scripts/maketests.in similarity index 100% rename from test/maketests.in rename to scripts/maketests.in diff --git a/test/mctestr.in b/scripts/mctestr.in similarity index 100% rename from test/mctestr.in rename to scripts/mctestr.in diff --git a/scripts/release.in b/scripts/release.in new file mode 100755 index 000000000..db2d9d940 --- /dev/null +++ b/scripts/release.in @@ -0,0 +1,3 @@ +#!/bin/sh + +cmake -DCMAKE_BUILD_TYPE=Release . diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index aad1572f7..d0938302f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -162,6 +162,3 @@ if(CMAKE_COMPILER_IS_GNUCXX) endif(CMAKE_COMPILER_IS_GNUCXX) ei_add_property(EIGEN_TESTING_SUMMARY "CXX_FLAGS: ${CMAKE_CXX_FLAGS}\n") ei_add_property(EIGEN_TESTING_SUMMARY "Sparse lib flags: ${SPARSE_LIBS}\n") - -configure_file(maketests.in ${CMAKE_BINARY_DIR}/maketests) -configure_file(mctestr.in ${CMAKE_BINARY_DIR}/mctestr) diff --git a/test/testsuite.cmake b/test/testsuite.cmake index 5d0cb6585..9c38e48b1 100644 --- a/test/testsuite.cmake +++ b/test/testsuite.cmake @@ -148,7 +148,7 @@ endif(NOT EIGEN_NO_UPDATE) # which ctest command to use for running the dashboard SET (CTEST_COMMAND "${EIGEN_CMAKE_DIR}ctest -D ${EIGEN_MODE}") # what cmake command to use for configuring this dashboard -SET (CTEST_CMAKE_COMMAND "${EIGEN_CMAKE_DIR}cmake -DEIGEN_CMAKE_RUN_FROM_CTEST=ON") +SET (CTEST_CMAKE_COMMAND "${EIGEN_CMAKE_DIR}cmake -DEIGEN_LEAVE_TEST_IN_ALL_TARGET=ON") #################################################################### # The values in this section are optional you can either