Skip to content

Commit

Permalink
set linker language
Browse files Browse the repository at this point in the history
  • Loading branch information
Smit-create committed Aug 11, 2023
1 parent f84afdd commit c95e679
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions integration_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,15 @@ macro(COMPILE)
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.py
VERBATIM)
add_library(${name} OBJECT ${name}.o)
set_target_properties(${name} PROPERTIES LINKER_LANGUAGE C)
elseif(KIND STREQUAL "c")
add_custom_command(
OUTPUT ${name}.c
COMMAND ${LPYTHON} ${extra_args} --disable-main --show-c ${CMAKE_CURRENT_SOURCE_DIR}/${name}.py > ${name}.c
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.py
VERBATIM)
add_library(${name} OBJECT ${name}.c)
set_target_properties(${name} PROPERTIES LINKER_LANGUAGE C)
target_link_libraries(${name} lpython_rtlib)
elseif(KIND STREQUAL "cpython")
# CPython test
Expand Down

0 comments on commit c95e679

Please sign in to comment.