[libc][Obvious] Add deps of fopencookie_test only if it is enabled.
authorSiva Chandra <sivachandra@google.com>
Tue, 26 Apr 2022 07:09:35 +0000 (00:09 -0700)
committerSiva Chandra <sivachandra@google.com>
Tue, 26 Apr 2022 07:10:29 +0000 (00:10 -0700)
libc/test/src/stdio/CMakeLists.txt

index 30e996c70c8db90e59ece9c49259f651d8ed1b74..88643cf5090662c957b95160509784024901a35f 100644 (file)
@@ -48,9 +48,11 @@ add_libc_unittest(
     libc.src.stdio.fwrite
 )
 
-target_link_libraries(
-  libc.test.src.stdio.fopencookie_test PRIVATE LibcMemoryHelpers
-)
+if(TARGET libc.test.src.stdio.fopencookie_test)
+  target_link_libraries(
+    libc.test.src.stdio.fopencookie_test PRIVATE LibcMemoryHelpers
+  )
+endif()
 
 add_subdirectory(printf_core)