Work around cmake problems in VTK (#1761)

The cmake scripts can't handle the semicolons in gcc's version output. Filter them out before detecting the version.
This commit is contained in:
Erik Schnetter 2016-09-20 05:15:37 -04:00 committed by Todd Gamblin
parent 2a558e9d7a
commit 70424b511e
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,21 @@
--- old/CMake/vtkCompilerExtras.cmake
+++ new/CMake/vtkCompilerExtras.cmake
@@ -26,6 +26,8 @@
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
OUTPUT_VARIABLE _gcc_version_info
ERROR_VARIABLE _gcc_version_info)
+
+ string (REPLACE ";" "" _gcc_version_info "${_gcc_version_info}")
string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
_gcc_version "${_gcc_version_info}")
--- old/CMake/GenerateExportHeader.cmake
+++ new/CMake/GenerateExportHeader.cmake
@@ -166,6 +166,7 @@
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
OUTPUT_VARIABLE _gcc_version_info
ERROR_VARIABLE _gcc_version_info)
+ string (REPLACE ";" "" _gcc_version_info "${_gcc_version_info}")
string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
_gcc_version "${_gcc_version_info}")
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the

View File

@ -40,6 +40,8 @@ class Vtk(Package):
version('6.1.0', '25e4dfb3bad778722dcaec80cd5dab7d')
patch("gcc.patch")
depends_on('cmake', type='build')
depends_on("qt")