summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-06-27 13:57:32 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-06-27 13:57:32 +0200
commite09ec2ec011c9559c14ca44e27c5bee037ee1342 (patch)
treee424b5e3e9ff0e608aa6c2e0506b91e8d1e4fa31
parent042454f03ada78a8560e6340ac15fe87ab753cbc (diff)
downloadcurl-e09ec2ec011c9559c14ca44e27c5bee037ee1342.tar.gz
libtest/CMakeLists: generate lib1521.cbagder/generate-lib1521
-rw-r--r--tests/libtest/CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/libtest/CMakeLists.txt b/tests/libtest/CMakeLists.txt
index 2f61599ea..4d42aa513 100644
--- a/tests/libtest/CMakeLists.txt
+++ b/tests/libtest/CMakeLists.txt
@@ -8,6 +8,7 @@ function(SETUP_TEST TEST_NAME) # ARGN are the files in the test
${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h"
${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
${CURL_BINARY_DIR}/include # To be able to reach "curl/curl.h"
+ ${CURL_SOURCE_DIR}/tests/libtest # To be able to build generated tests
)
if(USE_ARES)
include_directories(${CARES_INCLUDE_DIR})
@@ -49,7 +50,15 @@ if(NOT WIN32)
endif()
endif()
-# # files used only in some libcurl test programs
+add_custom_command(
+ OUTPUT lib1521.c
+ COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/mk-lib1521.pl < ${CMAKE_SOURCE_DIR}/include/curl/curl.h > lib1521.c
+ DEPENDS
+ "${CMAKE_CURRENT_SOURCE_DIR}/mk-lib1521.pl"
+ "${CMAKE_SOURCE_DIR}/include/curl/curl.h"
+ VERBATIM)
+
+ # # files used only in some libcurl test programs
# SET(TESTUTIL testutil.c testutil.h)
# # these files are used in every single test program below