This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen

Bug 738

Summary: Cmake problem in EigenConfigureTesting.cmake
Product: Eigen Reporter: Thomas Binder <tbinder15>
Component: GeneralAssignee: Nobody <eigen.nobody>
Status: RESOLVED FIXED    
Severity: Unknown CC: gael.guennebaud, jacob.benoit.1
Priority: Normal    
Version: 3.2   
Hardware: All   
OS: Mac OS   
Whiteboard:
Bug Depends on:    
Bug Blocks: 558    
Attachments:
Description Flags
Patch that fixes cmake typos related to bug #738 none

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.
Comment 6 Nobody 2019-12-04 12:59:33 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/738.