Skip to content

Commit

Permalink
Forcing to use make on Unix (#223) (#225)
Browse files Browse the repository at this point in the history
This also makes the process fail if pulling external code fails.

(cherry picked from commit d2249e8)

Co-authored-by: flabrosse <ffl@aber.ac.uk>
  • Loading branch information
mergify[bot] and flabrosse committed Jan 12, 2024
1 parent 2ed9866 commit fae1ad4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ idf_component_register(SRCS "network_interfaces/uros_ethernet_netif.c" "network_
REQUIRES nvs_flash esp_wifi esp_eth lwip)

if(CMAKE_GENERATOR STREQUAL "Unix Makefiles")
set(submake "$(MAKE)")
set(submake "make")
else()
set(submake "make")
endif()
Expand Down Expand Up @@ -53,6 +53,7 @@ endforeach()

execute_process(
WORKING_DIRECTORY ${COMPONENT_DIR}
RESULT_VARIABLE libmicroros_ret
COMMAND
${submake} -j -f libmicroros.mk
X_CC=${CMAKE_C_COMPILER}
Expand All @@ -72,6 +73,9 @@ execute_process(
IDF_VERSION_MINOR=${IDF_VERSION_MINOR}
EXTRA_ROS_PACKAGES=${EXTRA_ROS_PACKAGES}
)
if(libmicroros_ret AND NOT libmicroros_ret EQUAL 0)
message(FATAL_ERROR "FAILED: ${libmicroros_ret}")
endif()

add_prebuilt_library(libmicroros-prebuilt ""
REQUIRES lwip)
Expand Down

0 comments on commit fae1ad4

Please sign in to comment.