Skip to content

GitLab

  • Menu
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 740
    • Issues 740
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 198
    • Merge requests 198
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & 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
  • VTK
  • VTKVTK
  • Issues
  • #18114
Closed
Open
Created Feb 04, 2021 by Ben Boeckel@ben.boeckelOwner

Reduce `try_compile` overhead

This is mainly an issue with third party projects, but there are many checks which are done at configure time that can instead just be deferred to compile time by the preprocessor. We should seek to reduce these as much as possible.

Techniques:

  • consolidate checks for types to use the same variable name between third party packages (to use CMake's caching mechanisms)
  • port to KWIML (VTK::kwiml) which provides most (all?) of the sizeof(basic_type) values via the preprocessor
  • embed decisions that we know into the logic (e.g., fork() is just not going to exist on Windows, don't check for it; memcpy is in every platform VTK supports, etc.)
  • upstream what we can (probably hard; KWIML is unlikely to be accepted, but we adapt its code for inclusion upstream)

A from-scratch configure for VTK currently takes about 89s on CI. We can probably get this to be under 15s.

Cc: @brad.king (who did this for much of CMake's third party projects)
Cc: @robertmaynard @utkarsh.ayachit

Assignee
Assign to
Time tracking