Consider using -dumpversion instead of --version for detecting compiler version
The compiler being used by me on --version, throws the following output:
x86_64-conda_cos6-linux-gnu-cc (crosstool-NG 1.23.0.449-a04d0) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The regex parsing in the macro _vtk_test_compiler_hidden_visibility
in CMake/VTKGenerateExportHeader.cmake
fails, because then it sets gcc_version
to 3.0.449
instead of 7.3.0
and makes the assumption that the compiler is too old and ends up generating header files with no (blank) values for DEFINE_EXPORT
, DEFINE_IMPORT
and DEFINE_NO_EXPORT
Why use --version, instead of just -dumpversion or CMAKE_CXX_COMPILER_VERSION
?