neovim/neovim — pull request #1587 by equalsraf (2014-12-01 10:48:56+00:00)
Title: Don't use env vars for configuration time options

- As a general rule of thumb one shouldn't use environment variables
for setting configuration options for CMake. The reason for this is
we don't know when CMake will be executed and re-evaluate that variable.
- e.g. If we run cmake a first time with a var set, and then run make on
a second session (with no var) and cmake is called because a
dependency changed, the option would be disabled
- This commit removes the use of environment vars from
src/nvim/CMakeLists.txt entirely
- Removed SKIP_UNITTEST since it could only be used to remove a target
at configuration time (and the target was optional anyway)
- Turned SANITIZE into an option, clang-asan.sh now passes cmake
-DSANITIZE=ON
- Removed SKIP_EXEC since it was disabling a target at configuration time
(not being used)

Also see the note in http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_get_or_set_environment_variables.3F for more details on how using environment variables at configuration can mess up things in unexpected ways.