summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorSergei Nikulov <sergey.nikulov@gmail.com>2014-12-24 00:05:57 +0300
committerDaniel Stenberg <daniel@haxx.se>2015-02-19 20:11:20 +0100
commitb723ec9905f0ddf4633d49059d92e384315d95a9 (patch)
treeed7964eb2f6ff4c48fcb39d44fac979f36d474c2 /src/CMakeLists.txt
parentec80b1f414ef65f8a336be2e3270dcc35593f1b4 (diff)
downloadcurl-b723ec9905f0ddf4633d49059d92e384315d95a9.tar.gz
CMake: Fix generation of tool_hugehelp.c on windows
Use "cmake -E echo" instead of "echo". Reviewed-by: Brad King <brad.king@kitware.com>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9c1fd54ab..bfb866bd9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -6,18 +6,18 @@ if(USE_MANUAL)
# embedded text. NROFF and MANOPT are set in the parent CMakeLists.txt
add_custom_command(
OUTPUT tool_hugehelp.c
- COMMAND echo "#include \"tool_setup.h\"" > tool_hugehelp.c
- COMMAND echo "#ifndef HAVE_LIBZ" >> tool_hugehelp.c
+ COMMAND ${CMAKE_COMMAND} -E echo "#include \"tool_setup.h\"" > tool_hugehelp.c
+ COMMAND ${CMAKE_COMMAND} -E echo "#ifndef HAVE_LIBZ" >> tool_hugehelp.c
COMMAND env LC_ALL=C "${NROFF}" ${NROFF_MANOPT}
"${CURL_SOURCE_DIR}/docs/curl.1" |
"${PERL}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl"
"${CURL_SOURCE_DIR}/docs/MANUAL" >> tool_hugehelp.c
- COMMAND echo "#else" >> tool_hugehelp.c
+ COMMAND ${CMAKE_COMMAND} -E echo "#else" >> tool_hugehelp.c
COMMAND env LC_ALL=C "${NROFF}" ${NROFF_MANOPT}
"${CURL_SOURCE_DIR}/docs/curl.1" |
"${PERL}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl" -c
"${CURL_SOURCE_DIR}/docs/MANUAL" >> tool_hugehelp.c
- COMMAND echo "#endif /* HAVE_LIBZ */" >> tool_hugehelp.c
+ COMMAND ${CMAKE_COMMAND} -E echo "#endif /* HAVE_LIBZ */" >> tool_hugehelp.c
DEPENDS
"${CURL_SOURCE_DIR}/docs/MANUAL"
"${CURL_SOURCE_DIR}/docs/curl.1"
@@ -27,12 +27,13 @@ if(USE_MANUAL)
else()
add_custom_command(
OUTPUT tool_hugehelp.c
- COMMAND echo "/* built-in manual is disabled, blank function */" > tool_hugehelp.c
- COMMAND echo "#include \"tool_hugehelp.h\"" >> tool_hugehelp.c
- COMMAND echo "void hugehelp(void) {}" >> tool_hugehelp.c
+ COMMAND ${CMAKE_COMMAND} -E echo "/* built-in manual is disabled, blank function */" > tool_hugehelp.c
+ COMMAND ${CMAKE_COMMAND} -E echo "#include \"tool_hugehelp.h\"" >> tool_hugehelp.c
+ COMMAND ${CMAKE_COMMAND} -E echo "void hugehelp(void) {}" >> tool_hugehelp.c
DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/tool_hugehelp.h"
VERBATIM)
+
endif()
transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")