• Scientific Computing | SciVision

  • Blog
  • Tags
  • Categories

CMake temporary directory

19 October, 2022

Creating a unique temporary directory is not completely trivial. Despite the POSIX standard, some CIs (e.g. GitHub Actions) and Unix-like operating systems (e.g. Red Hat / CentOS) do not define the environment variables “TMPDIR” or “TEMP” for temporary directory.

Caveat: virus scanners can false detect activity in the system temporary directory as malicious.

Create a temporary directory in CMake:

  • CMake
  • cmake
  • GitHub Actions
  • Red Hat Enterprise Linux