[libclc] [libclc] Fix installation w/ ENABLE_RUNTIME_SUBNORMAL (PR #109926)

Aaron Puchert via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 25 12:32:41 PDT 2024


================
@@ -221,8 +221,10 @@ if( ENABLE_RUNTIME_SUBNORMAL )
        TARGET ${file}
        INPUTS ${CMAKE_CURRENT_SOURCE_DIR}/generic/lib/${file}.ll
     )
-    install( FILES $<TARGET_PROPERTY:${file},TARGET_FILE> ARCHIVE
-      DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" )
+    install(
+      FILES ${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_PROPERTY:${file},TARGET_FILE>
----------------
aaronpuchert wrote:

Can you try this?
```suggestion
      FILES $<TARGET_FILE:${file}>
```
According to the [documentation](https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#genex:TARGET_FILE), this should produce the "Full path to the `tgt` binary file." Though I'm surprised that your version works differently, it sounds similar. But I can't find it documented. There is documentation for [`$<TARGET_PROPERTY:tgt,prop>`](https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#genex:TARGET_PROPERTY), but I can't find a [target property](https://cmake.org/cmake/help/latest/manual/cmake-properties.7.html#target-properties) named `TARGET_FILE`.

https://github.com/llvm/llvm-project/pull/109926


More information about the cfe-commits mailing list