Skip to content

Commit

Permalink
check if architecture_candidates is empty if no proper architecture i…
Browse files Browse the repository at this point in the history
…s found
  • Loading branch information
Wanru Xia committed Nov 30, 2023
1 parent 01d704f commit 455302d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rti_connext_dds_cmake_module/cmake/rti_build_helper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,11 @@ function(rti_guess_connextdds_arch)

endforeach()

if(NOT CONNEXTDDS_ARCH)
list(GET architecture_candidates 0 CONNEXTDDS_ARCH)
if(CONNEXTDDS_ARCH)
if(CONNEXTDDS_ARCH)
message(STATUS "Selected CONNEXTDDS_ARCH: ${CONNEXTDDS_ARCH}")
else()
if(architecture_candidates)
list(GET architecture_candidates 0 CONNEXTDDS_ARCH)
message(STATUS
"unsupported CMAKE_HOST_SYSTEM_NAME (${CMAKE_HOST_SYSTEM_NAME}) "
"or CMAKE_HOST_SYSTEM_PROCESSOR (${CMAKE_HOST_SYSTEM_PROCESSOR}). "
Expand All @@ -541,9 +543,7 @@ function(rti_guess_connextdds_arch)
"CONNEXTDDS_ARCH not specified. Please set "
"-DCONNEXTDDS_ARCH= to specify your RTI Connext DDS "
" architecture")
endif()
else()
message(STATUS "Selected CONNEXTDDS_ARCH: ${CONNEXTDDS_ARCH}")
endif()
endif()

endif()
Expand Down

0 comments on commit 455302d

Please sign in to comment.