Skip to content

Commit fae1ad4

Browse files
Forcing to use make on Unix (#223) (#225)
This also makes the process fail if pulling external code fails. (cherry picked from commit d2249e8) Co-authored-by: flabrosse <ffl@aber.ac.uk>
1 parent 2ed9866 commit fae1ad4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ idf_component_register(SRCS "network_interfaces/uros_ethernet_netif.c" "network_
33
REQUIRES nvs_flash esp_wifi esp_eth lwip)
44

55
if(CMAKE_GENERATOR STREQUAL "Unix Makefiles")
6-
set(submake "$(MAKE)")
6+
set(submake "make")
77
else()
88
set(submake "make")
99
endif()
@@ -53,6 +53,7 @@ endforeach()
5353

5454
execute_process(
5555
WORKING_DIRECTORY ${COMPONENT_DIR}
56+
RESULT_VARIABLE libmicroros_ret
5657
COMMAND
5758
${submake} -j -f libmicroros.mk
5859
X_CC=${CMAKE_C_COMPILER}
@@ -72,6 +73,9 @@ execute_process(
7273
IDF_VERSION_MINOR=${IDF_VERSION_MINOR}
7374
EXTRA_ROS_PACKAGES=${EXTRA_ROS_PACKAGES}
7475
)
76+
if(libmicroros_ret AND NOT libmicroros_ret EQUAL 0)
77+
message(FATAL_ERROR "FAILED: ${libmicroros_ret}")
78+
endif()
7579

7680
add_prebuilt_library(libmicroros-prebuilt ""
7781
REQUIRES lwip)

0 commit comments

Comments
 (0)