fix: avoid warning by dropping '#pragma once'
Before this change, we would see the warning: "#pragma once in main file"
This commit is contained in:
parent
905d3204ae
commit
d74d4230b7
2 changed files with 4 additions and 0 deletions
|
|
@ -24,6 +24,8 @@ if(LLVM)
|
|||
FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/../include/lean/lean.h" LEAN_H)
|
||||
# generate LLVM IR for `static inline` definitions in lean.h for the LLVM backend
|
||||
string(REPLACE "static inline" "__attribute__((always_inline))" LEAN_H "${LEAN_H}")
|
||||
# drop '#pragma once' in .c file to avoid warning
|
||||
string(REPLACE "#pragma once" "" LEAN_H "${LEAN_H}")
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/lean_inlines.c" "${LEAN_H}")
|
||||
message("Generating LLVM bitcode file for Lean runtime at '${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lean.h.bc'")
|
||||
add_custom_command(
|
||||
|
|
|
|||
2
stage0/src/runtime/CMakeLists.txt
generated
2
stage0/src/runtime/CMakeLists.txt
generated
|
|
@ -24,6 +24,8 @@ if(LLVM)
|
|||
FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/../include/lean/lean.h" LEAN_H)
|
||||
# generate LLVM IR for `static inline` definitions in lean.h for the LLVM backend
|
||||
string(REPLACE "static inline" "__attribute__((always_inline))" LEAN_H "${LEAN_H}")
|
||||
# drop '#pragma once' in .c file to avoid warning
|
||||
string(REPLACE "#pragma once" "" LEAN_H "${LEAN_H}")
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/lean_inlines.c" "${LEAN_H}")
|
||||
message("Generating LLVM bitcode file for Lean runtime at '${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lean.h.bc'")
|
||||
add_custom_command(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue