This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 542 - Cmake script cannot recognize mingw
Summary: Cmake script cannot recognize mingw
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.1
Hardware: x86 - 32-bit Windows
: Normal major
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 3.2
  Show dependency treegraph
 
Reported: 2013-01-15 15:59 UTC by Vasileios Anagnostopoulos
Modified: 2019-12-04 12:01 UTC (History)
3 users (show)



Attachments

Description Vasileios Anagnostopoulos 2013-01-15 15:59:40 UTC
I used x32-4.7.2-release-posix-sjlj-rev6 under windows 7 x86
I used cmake 2.8.10.2

Error by cmake gui

CMake Error at cmake/EigenTesting.cmake:321 (ei_get_compilerver_from_cxx_version_string):
  ei_get_compilerver_from_cxx_version_string Macro invoked with incorrect
  arguments for macro named: ei_get_compilerver_from_cxx_version_string
Call Stack (most recent call first):
  cmake/EigenTesting.cmake:411 (ei_get_compilerver)
  cmake/EigenConfigureTesting.cmake:8 (ei_set_build_string)
  CMakeLists.txt:310 (include)


The result

It does not allow me to generate
Comment 1 Jitse Niesen 2013-06-17 23:31:21 UTC
Looking at the cmake code, may it be a possibility that  eigen_cxx_compiler_version_string is empty when ei_get_compilerver_from_cxx_version_string is called? Perhaps mingw does not include the "head" command? If I replace "head" by "hed", which is a non-existing command on my system, I get the same error message.

I'm hoping that somebody with more cmake knowledge can fix this.
Comment 2 Gael Guennebaud 2013-06-18 00:23:50 UTC
What about replacing the head command that is not available with windows shell with this cmake command:

string(REGEX REPLACE "[\n\r].*"  ""  eigen_cxx_compiler_version_string  ${eigen_cxx_compiler_version_string})

Works for me on OSX/Linux.
Comment 3 Jitse Niesen 2013-06-18 15:56:13 UTC
I guess we need somebody with mingw to test whether this really fixes the issue, though this seems a good idea anyway.
Comment 4 Gael Guennebaud 2013-06-18 17:26:53 UTC
works for us with mingw. I still kept the head command when this one is available, less risky.

https://bitbucket.org/eigen/eigen/commits/6607f616792c/
Changeset:   6607f616792c
User:        ggael
Date:        2013-06-18 17:25:37
Summary:     Fix bug 542: fix detection of compiler version on systems without the head command.
Comment 5 Nobody 2019-12-04 12:01:11 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/542.

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