aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2015-07-13 15:04:03 -0700
committerMiao Wang <miaowang@google.com>2015-07-13 15:04:03 -0700
commita829215e078ace896f52702caa0c27608f40e3b0 (patch)
treec87d2e609c3a6fa592d4c4fa911e0642aecae8e2 /cmake
parentee980c2801ec7c567cf3eef828874102a6083a9a (diff)
downloadeigen-a829215e078ace896f52702caa0c27608f40e3b0.tar.gz
Rebase Eigen to 3.2.5 (latest stable release)
Change-Id: Ib67c5a41748fe13c7824dbb78dd11e2cce08bc1b
Diffstat (limited to 'cmake')
-rw-r--r--cmake/EigenTesting.cmake13
-rw-r--r--cmake/FindMetis.cmake2
2 files changed, 11 insertions, 4 deletions
diff --git a/cmake/EigenTesting.cmake b/cmake/EigenTesting.cmake
index 80b2841df..f4796ca41 100644
--- a/cmake/EigenTesting.cmake
+++ b/cmake/EigenTesting.cmake
@@ -322,22 +322,29 @@ macro(ei_get_compilerver VAR)
endif()
else()
# on all other system we rely on ${CMAKE_CXX_COMPILER}
- # supporting a "--version" flag
+ # supporting a "--version" or "/version" flag
+
+ if(WIN32 AND NOT CYGWIN)
+ set(EIGEN_CXX_FLAG_VERSION "/version")
+ else()
+ set(EIGEN_CXX_FLAG_VERSION "--version")
+ endif()
# check whether the head command exists
find_program(HEAD_EXE head NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_CMAKE_SYSTEM_PATH)
if(HEAD_EXE)
- execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
+ execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${EIGEN_CXX_FLAG_VERSION}
COMMAND head -n 1
OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
- execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
+ execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${EIGEN_CXX_FLAG_VERSION}
OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX REPLACE "[\n\r].*" "" eigen_cxx_compiler_version_string ${eigen_cxx_compiler_version_string})
endif()
ei_get_compilerver_from_cxx_version_string("${eigen_cxx_compiler_version_string}" CNAME CVER)
set(${VAR} "${CNAME}-${CVER}")
+
endif()
endmacro(ei_get_compilerver)
diff --git a/cmake/FindMetis.cmake b/cmake/FindMetis.cmake
index e0040d320..6a0ce790c 100644
--- a/cmake/FindMetis.cmake
+++ b/cmake/FindMetis.cmake
@@ -26,7 +26,7 @@ macro(_metis_check_version)
string(REGEX MATCH "define[ \t]+METIS_VER_SUBMINOR[ \t]+([0-9]+)" _metis_subminor_version_match "${_metis_version_header}")
set(METIS_SUBMINOR_VERSION "${CMAKE_MATCH_1}")
if(NOT METIS_MAJOR_VERSION)
- message(WARNING "Could not determine Metis version. Assuming version 4.0.0")
+ message(STATUS "Could not determine Metis version. Assuming version 4.0.0")
set(METIS_VERSION 4.0.0)
else()
set(METIS_VERSION ${METIS_MAJOR_VERSION}.${METIS_MINOR_VERSION}.${METIS_SUBMINOR_VERSION})