diff --git a/tests/libtest/CMakeLists.txt b/tests/libtest/CMakeLists.txt index 6211aaae4..bea8d60c8 100644 --- a/tests/libtest/CMakeLists.txt +++ b/tests/libtest/CMakeLists.txt @@ -27,7 +27,11 @@ transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc. include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake) foreach(TEST_NAME ${noinst_PROGRAMS}) - setup_test(${TEST_NAME} ${${TEST_NAME}_SOURCES}) + if(DEFINED ${TEST_NAME}_SOURCES) + setup_test(${TEST_NAME} ${${TEST_NAME}_SOURCES}) + else() + setup_test(${TEST_NAME} ${nodist_${TEST_NAME}_SOURCES}) + endif() endforeach() # Allows for hostname override to make tests machine independent. diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am index a6ab719fc..03eeb06da 100644 --- a/tests/libtest/Makefile.am +++ b/tests/libtest/Makefile.am @@ -131,6 +131,3 @@ lib1521.c: $(top_srcdir)/tests/libtest/mk-lib1521.pl $(top_srcdir)/include/curl/ checksrc: @PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c - -dist: - rm lib1521.c diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc index b926724c7..ed536a564 100644 --- a/tests/libtest/Makefile.inc +++ b/tests/libtest/Makefile.inc @@ -405,7 +405,7 @@ lib1517_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1517 lib1520_SOURCES = lib1520.c $(SUPPORTFILES) lib1520_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1520 -lib1521_SOURCES = lib1521.c $(SUPPORTFILES) +nodist_lib1521_SOURCES = lib1521.c $(SUPPORTFILES) lib1521_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir) lib1525_SOURCES = lib1525.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)