[libc-commits] [libc] [libc][NFC] Remove incorrect file level dependency in CMake (PR #132937)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Tue Mar 25 07:26:57 PDT 2025


https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/132937

Summary:
CMake doesn't support this type of dependency so it keeps emitting a
warning. Just remove it, because it's not doing anything currently
anyway. If we really wanted this to work you'd need to add a custom
target that has a dependency on the output of a custom command, but that
would only be worhwhile if we ever expected this file to change.


>From 52571c604baae762986301ac35ae3bbe9eeec589 Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Tue, 25 Mar 2025 09:25:00 -0500
Subject: [PATCH] [libc][NFC] Remove incorrect file level dependency in CMake

Summary:
CMake doesn't support this type of dependency so it keeps emitting a
warning. Just remove it, because it's not doing anything currently
anyway. If we really wanted this to work you'd need to add a custom
target that has a dependency on the output of a custom command, but that
would only be worhwhile if we ever expected this file to change.
---
 libc/test/src/__support/CMakeLists.txt | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/libc/test/src/__support/CMakeLists.txt b/libc/test/src/__support/CMakeLists.txt
index 8d175e857fcd1..8cb99f19df0c3 100644
--- a/libc/test/src/__support/CMakeLists.txt
+++ b/libc/test/src/__support/CMakeLists.txt
@@ -267,12 +267,9 @@ if(NOT LIBC_TARGET_OS_IS_GPU)
     str_to_float_comparison_test.cpp
   )
 
-  set(float_test_file ${CMAKE_CURRENT_SOURCE_DIR}/str_to_float_comparison_data.txt)
-
   add_custom_command(TARGET libc_str_to_float_comparison_test
                      POST_BUILD
                      COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:libc_str_to_float_comparison_test> ${float_test_file}
-                     DEPENDS ${float_test_file}
                      COMMENT "Test the strtof and strtod implementations against precomputed results."
                      VERBATIM)
 endif()



More information about the libc-commits mailing list