This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, master has been updated via 0465c32a82f4da7745294edb1b0efe50ca66e15c (commit) via 9a5fe96f4fb8b5fbc39f8a01a388cf428ffaed32 (commit) via e21bae378d54b24f695080d05d55a9cfc6858877 (commit) via f20eab9cdc26ffbacb32e5942e2969058e50581a (commit) from 2f59cd637181cd246ab700767ea3e3cbd6cc3df4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0465c32a82f4da7745294edb1b0efe50ca66e15c commit 0465c32a82f4da7745294edb1b0efe50ca66e15c Merge: 9a5fe96 f20eab9 Author: Brad King <brad.k...@kitware.com> AuthorDate: Fri Mar 1 13:52:08 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Fri Mar 1 08:52:37 2019 -0500 Merge topic 'processor_count_linux_containers' f20eab9cdc ProcessorCount: Return the container CPU count instead of the host count Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3032 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a5fe96f4fb8b5fbc39f8a01a388cf428ffaed32 commit 9a5fe96f4fb8b5fbc39f8a01a388cf428ffaed32 Merge: 2f59cd6 e21bae3 Author: Brad King <brad.k...@kitware.com> AuthorDate: Fri Mar 1 13:51:31 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Fri Mar 1 08:51:50 2019 -0500 Merge topic 'drop-MIPSpro' e21bae378d WCDH: Restore definition for <prefix>_COMPILER_IS_MIPSpro Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !3043 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e21bae378d54b24f695080d05d55a9cfc6858877 commit e21bae378d54b24f695080d05d55a9cfc6858877 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Feb 28 11:32:16 2019 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Feb 28 11:34:36 2019 -0500 WCDH: Restore definition for <prefix>_COMPILER_IS_MIPSpro Code removed for MIPSpro by commit 214fcefa52 (Remove now-unused code once used for MIPSpro on IRIX, 2019-02-21) actually changed a public-facing API by dropping the `<prefix>_COMPILER_IS_MIPSpro` definition from the generated compiler detection header. Restore the definition hard-coded to `0` since the compiler will never be MIPSpro. Reported-by: Hans Johnson <hans-john...@uiowa.edu> diff --git a/Modules/CMakeCompilerIdDetection.cmake b/Modules/CMakeCompilerIdDetection.cmake index 7039b8d..01284eb 100644 --- a/Modules/CMakeCompilerIdDetection.cmake +++ b/Modules/CMakeCompilerIdDetection.cmake @@ -96,6 +96,8 @@ function(compiler_id_detection outvar lang) foreach(Id ${ordered_compilers}) string(APPEND CMAKE_${lang}_COMPILER_ID_CONTENT "# define ${CID_PREFIX}COMPILER_IS_${Id} 0\n") endforeach() + # Hard-code definitions for compilers that are no longer supported. + string(APPEND CMAKE_${lang}_COMPILER_ID_CONTENT "# define ${CID_PREFIX}COMPILER_IS_MIPSpro 0\n") endif() set(pp_if "#if") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f20eab9cdc26ffbacb32e5942e2969058e50581a commit f20eab9cdc26ffbacb32e5942e2969058e50581a Author: Sylvain Joubert <joubert...@gmail.com> AuthorDate: Wed Feb 27 12:47:07 2019 +0100 Commit: Sylvain Joubert <joubert...@gmail.com> CommitDate: Wed Feb 27 13:04:07 2019 +0100 ProcessorCount: Return the container CPU count instead of the host count On Linux containers (tested with LXC and Docker) getconf returns the host CPU count. Use nproc with a higher priority if available to get the container's allocated CPUs instead of the non-accessible host count. diff --git a/Modules/ProcessorCount.cmake b/Modules/ProcessorCount.cmake index e4b4e53..8c25256 100644 --- a/Modules/ProcessorCount.cmake +++ b/Modules/ProcessorCount.cmake @@ -70,6 +70,20 @@ function(ProcessorCount var) endif() if(NOT count) + # Linux (systems with nproc): + # Prefer nproc to getconf if available as getconf may return the host CPU count in Linux containers + find_program(ProcessorCount_cmd_nproc nproc) + mark_as_advanced(ProcessorCount_cmd_nproc) + if(ProcessorCount_cmd_nproc) + execute_process(COMMAND ${ProcessorCount_cmd_nproc} + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + OUTPUT_VARIABLE count) + #message("ProcessorCount: trying nproc '${ProcessorCount_cmd_nproc}'") + endif() + endif() + + if(NOT count) # Linux (systems with getconf): find_program(ProcessorCount_cmd_getconf getconf) mark_as_advanced(ProcessorCount_cmd_getconf) ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCompilerIdDetection.cmake | 2 ++ Modules/ProcessorCount.cmake | 14 ++++++++++++++ 2 files changed, 16 insertions(+) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits