SHA256
1
0
forked from pool/vtk
vtk/vtk-gcc6.patch

45 lines
1.8 KiB
Diff
Raw Normal View History

diff --git a/CMake/GenerateExportHeader.cmake b/CMake/GenerateExportHeader.cmake
index ecfae31..80244df 100644
--- a/CMake/GenerateExportHeader.cmake
+++ b/CMake/GenerateExportHeader.cmake
@@ -163,10 +163,10 @@ endmacro()
macro(_test_compiler_hidden_visibility)
if(CMAKE_COMPILER_IS_GNUCXX)
- execute_process(COMMAND ${CMAKE_C_COMPILER} ARGS --version
+ execute_process(COMMAND ${CMAKE_C_COMPILER} --version
OUTPUT_VARIABLE _gcc_version_info
ERROR_VARIABLE _gcc_version_info)
- string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
+ string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
_gcc_version "${_gcc_version_info}")
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
# patch level, handle this here:
@@ -181,7 +181,7 @@ macro(_test_compiler_hidden_visibility)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
- execute_process(COMMAND ${CMAKE_CXX_COMPILER} ARGS -V
+ execute_process(COMMAND ${CMAKE_CXX_COMPILER} -V
OUTPUT_VARIABLE _intel_version_info
ERROR_VARIABLE _intel_version_info)
string(REGEX REPLACE ".*Version ([0-9]+(\\.[0-9]+)+).*" "\\1"
diff --git a/CMake/vtkCompilerExtras.cmake b/CMake/vtkCompilerExtras.cmake
index e39bd30..4dc928a 100644
--- a/CMake/vtkCompilerExtras.cmake
+++ b/CMake/vtkCompilerExtras.cmake
@@ -28,11 +28,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif()
# Now check if we can use visibility to selectively export symbols
- execute_process(COMMAND ${CMAKE_C_COMPILER} ARGS --version
+ execute_process(COMMAND ${CMAKE_C_COMPILER} --version
OUTPUT_VARIABLE _gcc_version_info
ERROR_VARIABLE _gcc_version_info)
- string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
+ string (REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
_gcc_version "${_gcc_version_info}")
if(NOT _gcc_version)
string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0"