New user self-registration is currently disabled. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Bug 738 - Cmake problem in EigenConfigureTesting.cmake
Cmake problem in EigenConfigureTesting.cmake
Status: RESOLVED FIXED
Product: Eigen
Classification: Unclassified
Component: General
3.2
All Mac OS
: Normal Unknown
Assigned To: Nobody
:
Depends on:
Blocks: 3.3
  Show dependency treegraph
 
Reported: 2014-02-10 18:06 UTC by Thomas Binder
Modified: 2014-06-06 11:13 UTC (History)
2 users (show)



Attachments
Patch that fixes cmake typos related to bug #738 (1.89 KB, patch)
2014-06-04 20:32 UTC, Thomas Binder
no flags Details | Diff

Description Thomas Binder 2014-02-10 18:06:21 UTC
The following two lines had to be changed when including Eigen in a cmake project on XCode 5.0 by

add_subdirectory(${ROOT}/eigen ${BUILD_DIR}/eigen)
include_directory(${ROOT}/eigen)

cmake version is 2.8.10, Mac OS X version is 10.9.1. The failure occurs when running cmake -G Xcode on the CMakeLists.txt of "my" project which depends on eigen. This seems like a typo, although I am wondering why I should be the first one to notice.

==== //depot/google3/third_party/eigen3/cmake/EigenConfigureTesting.cmake#2 - /ssd/repos/absolute/google3/third_party/eig$
44c44
< configure_file(${CMAKE_BINARY_DIR}/DartConfiguration.tcl ${CMAKE_BINARY_DIR}/DartConfiguration.tcl)
---
> configure_file(${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl ${CMAKE_BINARY_DIR}/DartConfiguration.tcl)
53c53
< configure_file(${CMAKE_SOURCE_DIR}/CTestCustom.cmake.in ${CMAKE_BINARY_DIR}/CTestCustom.cmake)
---
> configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in ${CMAKE_BINARY_DIR}/CTestCustom.cmake)
Comment 1 Gael Guennebaud 2014-02-14 15:20:31 UTC
You're probably the first one to include Eigen's CMakeLists.txt in another project. Since Eigen is a header only library, I don't really see the purpose of doing that.
Comment 2 Thomas Binder 2014-04-09 13:16:58 UTC
Is there any reason against switching to the *_CURRENT_" variables for source and binary directory? Again, I am not a cmake expert, but the CURRENT version seems to be "more correct", even if the present version happens to work in certain scenarios.

The same issue is also present in the top-level CMakeLists.txt, lines 440 and 445 as of Eigen V 3.2.1.
Comment 3 Gael Guennebaud 2014-04-13 11:50:00 UTC
Agree.

Complete patch welcome.
Comment 4 Thomas Binder 2014-06-04 20:32:39 UTC
Created attachment 465 [details]
Patch that fixes cmake typos related to bug #738

Sorry for the delay - patch is attached.

Note You need to log in before you can comment on or make changes to this bug.