Skip to content

Commit cb6e609

Browse files
committed
finally, the right fix: set CTEST_BUILD_TARGET.
So this is the come-back of btest target, and the default target is empty again.
1 parent 174be54 commit cb6e609

File tree

5 files changed

+10
-22
lines changed

5 files changed

+10
-22
lines changed

CMakeLists.txt

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ add_subdirectory(doc EXCLUDE_FROM_ALL)
124124

125125
include(CTest)
126126
enable_testing() # must be called from the root CMakeLists, see man page
127-
add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest
127+
add_subdirectory(test EXCLUDE_FROM_ALL) # can't do EXCLUDE_FROM_ALL here, breaks CTest
128128

129129
add_subdirectory(unsupported)
130130

@@ -145,24 +145,12 @@ message("--------------+--------------------------------------------------------
145145
message("Command | Description")
146146
message("--------------+----------------------------------------------------------------")
147147
message("make install | Install to ${CMAKE_INSTALL_PREFIX}")
148-
message(" | To change that: cmake . -DCMAKE_INSTALL_PREFIX=yourpath")
149-
message("make | Build the unit tests")
150-
message(" | * That's not needed if you just want to install Eigen!")
151-
message(" | * That takes lots of memory! Easy on the -j option!")
148+
message(" | * To change that: cmake . -DCMAKE_INSTALL_PREFIX=yourpath")
149+
message("make btest | Build the unit tests")
150+
message(" | * That takes lots of memory! Easy on the -j option")
152151
message("make test | Build and run the unit tests (using CTest)")
153152
message("make test_qr | Build a specific test, here test_qr. To run it: test/test_qr")
154153
message("make debug_qr | Build a test with full debug info. To run it: test/debug_qr")
155154
message("make blas | Build BLAS library (not the same thing as Eigen)")
156155
message("make doc | Generate the API documentation, requires Doxygen & LaTeX")
157156
message("--------------+----------------------------------------------------------------")
158-
159-
if(NOT EIGEN_CMAKE_ALREADY_RUN)
160-
unset(EIGEN_CMAKE_ALREADY_RUN CACHE) # in case it was manually set to OFF in cache
161-
set(EIGEN_CMAKE_ALREADY_RUN "ON" CACHE BOOL "Set to ON if CMake has already run here.")
162-
message("")
163-
message("First-time tip:")
164-
message("")
165-
message("If you just want to install Eigen, do 'make install' right away.")
166-
message("No need to do 'make' before. See INSTALL file for more details.")
167-
message("")
168-
endif(NOT EIGEN_CMAKE_ALREADY_RUN)

CTestConfig.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ set(CTEST_DROP_METHOD "http")
1111
set(CTEST_DROP_SITE "eigen.tuxfamily.org")
1212
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Eigen")
1313
set(CTEST_DROP_SITE_CDASH TRUE)
14+
set(CTEST_BUILD_TARGET "btest")

INSTALL

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ Installation instructions for Eigen
44
Explanation before starting
55
***************************
66

7-
It is very important to understand that Eigen consists only of header files,
8-
hence there is nothing to compile before you can use it. Moreover, these
9-
header files do not depend on your platform, they are the same for
10-
everybody.
11-
7+
Eigen consists only of header files, hence there is nothing to compile
8+
before you can use it. Moreover, these header files do not depend on your
9+
platform, they are the same for everybody.
1210

1311
Method 1. Installing without using CMake
1412
****************************************

cmake/EigenTesting.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ macro(ei_add_test testname)
4444

4545
set(filename ${testname}.cpp)
4646
add_executable(${targetname} ${filename})
47+
add_dependencies(btest ${targetname})
4748
add_executable(${debug_targetname} ${filename})
4849

4950
if(NOT EIGEN_NO_ASSERTION_CHECKING)

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project(EigenTesting)
2-
2+
add_custom_target(btest)
33
include(EigenTesting)
44
ei_init_testing()
55

0 commit comments

Comments
 (0)