Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 833
    • Issues 833
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 241
    • Merge requests 241
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTKVTK
  • VTKVTK
  • Issues
  • #17412
Closed
Open
Issue created Oct 14, 2018 by Nehal J Wani@nehaljwani

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 ?

Assignee
Assign to
Time tracking