diff --git a/tests/libtest/CMakeLists.txt b/tests/libtest/CMakeLists.txt index f5f6a0d10c..60b1bd42f4 100644 --- a/tests/libtest/CMakeLists.txt +++ b/tests/libtest/CMakeLists.txt @@ -27,7 +27,9 @@ curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") -set_source_files_properties("../../lib/curl_multibyte.c" PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON) +if(ENABLE_CURLDEBUG) + set_source_files_properties("../../lib/curl_multibyte.c" PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON) +endif() add_custom_command( OUTPUT "lib1521.c" diff --git a/tests/server/CMakeLists.txt b/tests/server/CMakeLists.txt index 3b18bba4c3..b7bd88151e 100644 --- a/tests/server/CMakeLists.txt +++ b/tests/server/CMakeLists.txt @@ -26,7 +26,9 @@ curl_transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake") -set_source_files_properties("../../lib/memdebug.c" "../../lib/curl_multibyte.c" PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON) +if(ENABLE_CURLDEBUG) + set_source_files_properties("../../lib/memdebug.c" "../../lib/curl_multibyte.c" PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON) +endif() foreach(_target IN LISTS noinst_PROGRAMS) set(_target_name "${_target}")