cURL / Mailing Lists / curl-library / Single Mail

curl-library

Fix cmake not re-creating missing tool_hugehelp

From: Peter Wu <peter_at_lekensteyn.nl>
Date: Sat, 11 Oct 2014 11:53:13 +0200

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.
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...")
-- 
2.1.1
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-10-11