]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: always build unit tests with the `testdeps` target
authorViktor Szakats <commit@vsz.me>
Sat, 18 May 2024 00:15:32 +0000 (02:15 +0200)
committerViktor Szakats <commit@vsz.me>
Mon, 27 May 2024 20:26:41 +0000 (22:26 +0200)
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 39e7c22bb459c2e818f079984989a26a09741860 #11446
Closes #13698

tests/unit/CMakeLists.txt

index 6d2c15578430722e861328424675e132994b2c09..07421220a8795c16fb9c4a86c8c98cf5f5d74416 100644 (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()