[libc-commits] [libc] e161d36 - [libc][Obvious] Add deps of fopencookie_test only if it is enabled.

Siva Chandra via libc-commits libc-commits at lists.llvm.org
Tue Apr 26 00:14:00 PDT 2022


Author: Siva Chandra
Date: 2022-04-26T00:10:29-07:00
New Revision: e161d36ceafcec4d69585c57f49f3dbdad2cb970

URL: https://github.com/llvm/llvm-project/commit/e161d36ceafcec4d69585c57f49f3dbdad2cb970
DIFF: https://github.com/llvm/llvm-project/commit/e161d36ceafcec4d69585c57f49f3dbdad2cb970.diff

LOG: [libc][Obvious] Add deps of fopencookie_test only if it is enabled.

Added: 
    

Modified: 
    libc/test/src/stdio/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/test/src/stdio/CMakeLists.txt b/libc/test/src/stdio/CMakeLists.txt
index 30e996c70c8db..88643cf509066 100644
--- a/libc/test/src/stdio/CMakeLists.txt
+++ b/libc/test/src/stdio/CMakeLists.txt
@@ -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)
 


        


More information about the libc-commits mailing list