cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Fix cmake not re-creating missing tool_hugehelp

From: Peter Wu <peter_at_lekensteyn.nl>
Date: Sun, 12 Oct 2014 11:15:58 +0200

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 <peter_at_lekensteyn.nl>
> ---
> 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
Received on 2014-10-12