On 05/06/2016 09:02 AM, ivan Ivanov wrote:
> Fix for https://cmake.org/Bug/view.php?id=15756

Thanks for working on this.

Please split the patch to first perform refactoring like moving
the version extraction into a helper function.  Then the actual
logic change will be easier to see in the second commit.  Also
please name helper functions as "_lua_...".  We might as well
rename the set_lua_version_vars helper while we're at it.

> +    unset(LUA_INCLUDE_PREFIX CACHE)
> +    find_path(LUA_INCLUDE_PREFIX ${subdir}/lua.h

This renames the cache entry from LUA_INCLUDE_DIR to
LUA_INCLUDE_PREFIX and also stops re-using an already-found
or user-provided value.  Neither of these follows CMake conventions.
I don't follow why this change is needed.  Using version-specific
paths in a normal find_path(LUA_INCLUDE_DIR ...) should be enough.

Thanks,
-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to