Skip to content

Commit d2249e8

Browse files
authored
Forcing to use make on Unix (#223)
This also makes the process fail if pulling external code fails.
1 parent 27158f2 commit d2249e8

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()
@@ -50,6 +50,7 @@ endforeach()
5050

5151
execute_process(
5252
WORKING_DIRECTORY ${COMPONENT_DIR}
53+
RESULT_VARIABLE libmicroros_ret
5354
COMMAND
5455
${submake} -j -f libmicroros.mk
5556
X_CC=${CMAKE_C_COMPILER}
@@ -69,6 +70,9 @@ execute_process(
6970
IDF_VERSION_MINOR=${IDF_VERSION_MINOR}
7071
EXTRA_ROS_PACKAGES=${EXTRA_ROS_PACKAGES}
7172
)
73+
if(libmicroros_ret AND NOT libmicroros_ret EQUAL 0)
74+
message(FATAL_ERROR "FAILED: ${libmicroros_ret}")
75+
endif()
7276

7377
add_prebuilt_library(libmicroros-prebuilt ""
7478
REQUIRES lwip)

0 commit comments

Comments
 (0)