Yelp / MOE

A global, black box optimization engine for real world metric optimization.
Other
1.31k stars 139 forks source link

we're using the wrong cmake test for variable existence #372

Closed suntzu86 closed 10 years ago

suntzu86 commented 10 years ago

EXISTS checks whether the argument is a valid directory or file. DEFINED checks whether a variable is defined.

we probably want something more like

if (DEFINED variable)
  if (EXISTS ${variable})
    do_stuff
  else()
    error_message
  endif()
endif()

there is also IS_DIRECTORY to check just the directory feature. currently if you pass us an invalid value, we will just ignore it.

suntzu86 commented 10 years ago

fixed in: https://github.com/Yelp/MOE/pull/363