================
@@ -167,12 +181,14 @@ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libclc.pc 
DESTINATION "${CMAKE_INSTAL
 install( DIRECTORY generic/include/clc DESTINATION 
"${CMAKE_INSTALL_INCLUDEDIR}" )
 
 if( ENABLE_RUNTIME_SUBNORMAL )
-  add_library( subnormal_use_default STATIC
-    generic/lib/subnormal_use_default.ll )
-  add_library( subnormal_disable STATIC
-    generic/lib/subnormal_disable.ll )
-  install( TARGETS subnormal_use_default subnormal_disable ARCHIVE
-    DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" )
+  foreach( file subnormal_use_default subnormal_disable )
+    link_bc(
+       TARGET ${file}
+       INPUTS ${PROJECT_SOURCE_DIR}/generic/lib/${file}.ll
+    )
+    install( FILES $<TARGET_PROPERTY:${file},TARGET_FILE> ARCHIVE
----------------
aaronpuchert wrote:

This causes an installation error for me with 
`-DENABLE_RUNTIME_SUBNORMAL:BOOL=ON`:
```
CMake Error at cmake_install.cmake:54 (file):
  file INSTALL cannot find
  "[...]/ARCHIVE": No such file or directory.
```
According to the 
[documentation](https://cmake.org/cmake/help/latest/command/install.html), 
`ARCHIVE` is a valid option for `install(TARGETS ...)`, but not for 
`install(FILES ...)`.

https://github.com/llvm/llvm-project/pull/87622
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to