Skip to content

[libc][NFC] Remove incorrect file level dependency in CMake #132937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 25, 2025

Conversation

jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Mar 25, 2025

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.

@llvmbot
Copy link
Member

llvmbot commented Mar 25, 2025

@llvm/pr-subscribers-libc

Author: Joseph Huber (jhuber6)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/132937.diff

1 Files Affected:

  • (modified) libc/test/src/__support/CMakeLists.txt (-3)
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()

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.
@jhuber6 jhuber6 merged commit 6aed161 into llvm:main Mar 25, 2025
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants