Skip to content

Commit

Permalink
CMake: add guards on compiler arch includes
Browse files Browse the repository at this point in the history
Only include arch specific subdirectories, if the they actually exist.

Signed-off-by: Devin Nakamura <devinn@ca.ibm.com>
  • Loading branch information
dnakamura committed Nov 18, 2021
1 parent 7ce2fd8 commit 4312067
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions runtime/compiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,11 @@ if(J9VM_OPT_JITSERVER)
add_subdirectory(net)
endif()

add_subdirectory(${TR_HOST_ARCH})
if(NOT TR_TARGET_ARCH STREQUAL TR_HOST_ARCH)
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${TR_HOST_ARCH}")
add_subdirectory(${TR_HOST_ARCH})
endif()

if(NOT TR_TARGET_ARCH STREQUAL TR_HOST_ARCH AND IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${TR_TARGET_ARCH}")
add_subdirectory(${TR_TARGET_ARCH})
endif()

Expand Down

0 comments on commit 4312067

Please sign in to comment.