We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86a6fe0 commit be7b2faCopy full SHA for be7b2fa
cdk/cmake/DepFindProtobuf.cmake
@@ -221,9 +221,20 @@ if(SUNPRO)
221
)
222
endif()
223
224
+#
225
+# Try using parallel builds for protobuf.
226
227
+
228
+set(opt_build)
229
+set(opt_tool)
230
+if(NOT CMAKE_VERSION VERSION_LESS 3.12)
231
+ set(opt_build --parallel)
232
+elseif(CMAKE_MAKE_PROGRAM MATCHES "make")
233
+ set(opt_tool -j)
234
+endif()
235
236
add_custom_command(OUTPUT "${build_stamp}"
- COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG_EXPR}
237
+ COMMAND ${CMAKE_COMMAND} --build . ${opt_build} --config ${CONFIG_EXPR} -- ${opt_tool}
238
COMMAND ${CMAKE_COMMAND} -E touch "${build_stamp}"
239
WORKING_DIRECTORY "${PB_BINARY_DIR}"
240
COMMENT "Building protobuf"
0 commit comments