On Saturday 11 October 2014 11:53:13 Peter Wu wrote:
> Always test for the file, ignoring the cache file.
> 
> Signed-off-by: Peter Wu <[email protected]>
> ---
> Hi,
> 
> This at least fixes the cmake build when re-executed with a missing
> tool_hugehelp.c file. I did not attempt to properly create tool_hugehelp.c 
> here.

Please drop this patch, I got an alternative that properly creates
tool_hugehelp.c

Peter

> Kind regards,
> Peter
> ---
>  src/CMakeLists.txt | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
> index fceaf10..5054ae7 100644
> --- a/src/CMakeLists.txt
> +++ b/src/CMakeLists.txt
> @@ -1,7 +1,8 @@
>  set(EXE_NAME curl)
>  
>  # First try to locate tool_hugehelp.c to see if it has already been created
> -# TODO Find the file WITHOUT adding a cache entry!!! Or else the user can 
> delete the file after the script was first run, and the script won't notice 
> it has gone.
> +# Always perform this check without using the cache as the file could be 
> deleted
> +UNSET(HUGEHELP_C_FILE CACHE)
>  find_file(HUGEHELP_C_FILE tool_hugehelp.c PATHS . NO_DEFAULT_PATH)
>  if (NOT HUGEHELP_C_FILE)
>    message(STATUS "Warning: tool_hugehelp.c file was not generated before. 
> Generating an 'empty' file...")
> 

-- 
Kind regards,
Peter
https://lekensteyn.nl

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to