Skip to content

Adding to path like environment variables

Mayeul d'Avezac edited this page Apr 11, 2014 · 1 revision
include(Utilities)
add_to_envvar(
  VARIABLE  -- Name of the environment variable
  PATH      -- Path to add
  [PREPEND] -- If path, adds at begining of list
  [OS somevariable] -- Only add path if the variable is defined.
                       Could be WIN32, or APPLE, or UNIX of anything else.
)

Whether child processes actually see the change is open to discussion.