Skip to content

Commit

Permalink
TEST: Use EXTRA_ARGS to pass path to src/runtime/include
Browse files Browse the repository at this point in the history
  • Loading branch information
czgdp1807 committed Dec 18, 2023
1 parent 872bd8c commit 6a31194
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions integration_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ macro(RUN_UTIL RUN_FAIL RUN_NAME RUN_FILE_NAME RUN_LABELS RUN_EXTRAFILES RUN_EXT
OR (LC_BACKEND STREQUAL "c") OR (LC_BACKEND STREQUAL "fortran"))
add_custom_command(
OUTPUT ${name}.o
COMMAND ${LC} -c ${extra_args} ${CMAKE_CURRENT_SOURCE_DIR}/${file_name} -o ${name}.o --extra-arg-before -I$CONDA_PREFIX/include --extra-arg -I${CMAKE_CURRENT_SOURCE_DIR}/../src/runtime/include --
COMMAND ${LC} -c ${CMAKE_CURRENT_SOURCE_DIR}/${file_name} -o ${name}.o ${extra_args} --
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file_name}
VERBATIM)
add_executable(${name} ${name}.o ${extra_files})
Expand Down Expand Up @@ -176,11 +176,16 @@ endmacro(RUN)
# x86 --- compile to x86 binary directly
# wasm --- compile to WASM binary directly

RUN(NAME expr1.c LABELS gcc c wasm llvm NOFAST)
RUN(NAME expr2.c LABELS gcc c wasm llvm NOFAST)
RUN(NAME expr3.c FAIL LABELS gcc c wasm llvm NOFAST)
RUN(NAME expr1.c LABELS gcc c wasm llvm NOFAST
EXTRA_ARGS --extra-arg=-I${CMAKE_CURRENT_SOURCE_DIR}/../src/runtime/include)
RUN(NAME expr2.c LABELS gcc c wasm llvm NOFAST
EXTRA_ARGS --extra-arg=-I${CMAKE_CURRENT_SOURCE_DIR}/../src/runtime/include)
RUN(NAME expr3.c FAIL LABELS gcc c wasm llvm NOFAST
EXTRA_ARGS --extra-arg=-I${CMAKE_CURRENT_SOURCE_DIR}/../src/runtime/include)

# arrays
RUN(NAME array_01.cpp LABELS gcc llvm NOFAST)
RUN(NAME array_02.cpp LABELS gcc llvm NOFAST)
RUN(NAME array_01.cpp LABELS gcc llvm NOFAST
EXTRA_ARGS --extra-arg=-I${CMAKE_CURRENT_SOURCE_DIR}/../src/runtime/include)
RUN(NAME array_02.cpp LABELS gcc llvm NOFAST
EXTRA_ARGS --extra-arg=-I${CMAKE_CURRENT_SOURCE_DIR}/../src/runtime/include)
RUN(NAME array_03.cpp LABELS gcc llvm NOFAST)

0 comments on commit 6a31194

Please sign in to comment.