summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-02-18 16:23:23 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-02-18 16:23:31 (GMT)
commitb841fdcb9e91e848e57f81129eaf6a1f9b0c0a2d (patch)
treee585584452793dcdb535dc3c2dd3f28d6aceb22c /Modules
parent71b0c6b5f85bab47658c108409d6fd1ed3330105 (diff)
parente6c470997f5d59b0ea4249af64172edb7d1ee0db (diff)
downloadCMake-b841fdcb9e91e848e57f81129eaf6a1f9b0c0a2d.zip
CMake-b841fdcb9e91e848e57f81129eaf6a1f9b0c0a2d.tar.gz
CMake-b841fdcb9e91e848e57f81129eaf6a1f9b0c0a2d.tar.bz2
Merge topic 'CPackNuGet-granular-errors'
e6c470997f CPack/NuGet: Provide more granular errors Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alex Turbov <i.zaufi@gmail.com> Merge-request: !4132
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Internal/CPack/CPackNuGet.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/Modules/Internal/CPack/CPackNuGet.cmake b/Modules/Internal/CPack/CPackNuGet.cmake
index 1f4bcfd..20eed2e 100644
--- a/Modules/Internal/CPack/CPackNuGet.cmake
+++ b/Modules/Internal/CPack/CPackNuGet.cmake
@@ -287,7 +287,11 @@ if(CPACK_NUGET_ORDINAL_MONOLITIC)
execute_process(
COMMAND "${NUGET_EXECUTABLE}" pack ${CPACK_NUGET_PACK_ADDITIONAL_OPTIONS}
WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}"
+ RESULT_VARIABLE _nuget_result
)
+ if(NOT _nuget_result EQUAL 0)
+ message(FATAL_ERROR "Nuget pack failed")
+ endif()
elseif(CPACK_NUGET_ALL_IN_ONE)
# This variable `CPACK_NUGET_ALL_IN_ONE` set by C++ code:
@@ -300,7 +304,11 @@ elseif(CPACK_NUGET_ALL_IN_ONE)
execute_process(
COMMAND "${NUGET_EXECUTABLE}" pack ${CPACK_NUGET_PACK_ADDITIONAL_OPTIONS}
WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}"
+ RESULT_VARIABLE _nuget_result
)
+ if(NOT _nuget_result EQUAL 0)
+ message(FATAL_ERROR "Nuget pack failed")
+ endif()
else()
# Is there any grouped component?
@@ -322,7 +330,11 @@ else()
execute_process(
COMMAND "${NUGET_EXECUTABLE}" pack ${CPACK_NUGET_PACK_ADDITIONAL_OPTIONS}
WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}"
+ RESULT_VARIABLE _nuget_result
)
+ if(NOT _nuget_result EQUAL 0)
+ message(FATAL_ERROR "Nuget pack failed")
+ endif()
endforeach()
endif()
# Is there any single component package needed?
@@ -341,7 +353,11 @@ else()
execute_process(
COMMAND "${NUGET_EXECUTABLE}" pack ${CPACK_NUGET_PACK_ADDITIONAL_OPTIONS}
WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}"
+ RESULT_VARIABLE _nuget_result
)
+ if(NOT _nuget_result EQUAL 0)
+ message(FATAL_ERROR "Nuget pack failed")
+ endif()
endforeach()
endif()
endif()