cmake: always build unit tests with the testdeps target

Before this patch, the `testdeps` build target required `-DCURLDEBUG`
be set either via `ENABLE_DEBUG=ON` or `ENABLE_CURLDEBUG=ON` to build
the curl unit tests.

After fixing build issues in #13694, we can drop this requirement and
build unit tests unconditionally.

Depends-on: #13694
Depends-on: #13697 (fix unit test issue revealed by Old Linux CI job)
Follow-up to 39e7c22bb4 #11446
Closes #13698
This commit is contained in:
Viktor Szakats 2024-05-18 02:15:32 +02:00
parent 4521eac45a
commit 1054c1cc20
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -33,10 +33,8 @@ include_directories(
${CURL_BINARY_DIR}/include # for "curl/curl.h"
)
if(ENABLE_CURLDEBUG) # running unittests require curl to compiled with CURLDEBUG
foreach(_testfile ${UNITPROGS})
add_executable(${_testfile} EXCLUDE_FROM_ALL ${_testfile}.c ${UNITFILES})
add_dependencies(testdeps ${_testfile})
target_link_libraries(${_testfile} curltool curlu)
endforeach()
endif()
foreach(_testfile ${UNITPROGS})
add_executable(${_testfile} EXCLUDE_FROM_ALL ${_testfile}.c ${UNITFILES})
add_dependencies(testdeps ${_testfile})
target_link_libraries(${_testfile} curltool curlu)
endforeach()