From: Martin Quinson Date: Fri, 27 Jan 2012 20:36:13 +0000 (+0100) Subject: Revert "Add a script to detect the number of core." X-Git-Tag: exp_20120216~119^2~4 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/45828afae688f0901c5259c944e91e173390779e Revert "Add a script to detect the number of core." There is no use of detecting the amount of cores at compile time. We need the amount of cores at runtime. This reverts commit 39b99d7659c7f2ecd789c141a8fced9bf9684cff. --- diff --git a/buildtools/Cmake/Modules/FindNbCore.cmake b/buildtools/Cmake/Modules/FindNbCore.cmake deleted file mode 100644 index 4b3c5935f1..0000000000 --- a/buildtools/Cmake/Modules/FindNbCore.cmake +++ /dev/null @@ -1,28 +0,0 @@ -if(NOT DEFINED PROCESSOR_COUNT) - # Default: - set(PROCESSOR_COUNT 1) - - # Linux: - set(cpuinfo_file "/proc/cpuinfo") - if(EXISTS "${cpuinfo_file}") - file(STRINGS "${cpuinfo_file}" procs REGEX "^processor.: [0-9]+$") - list(LENGTH procs PROCESSOR_COUNT) - endif() - - # Mac: - if(APPLE) - find_program(cmd_sys_pro "system_profiler") - if(cmd_sys_pro) - execute_process(COMMAND ${cmd_sys_pro} OUTPUT_VARIABLE info) - string(REGEX REPLACE "^.*Total Number Of Cores: ([0-9]+).*$" "\\1" - PROCESSOR_COUNT "${info}") - endif() - endif() - - # Windows: - if(WIN32) - set(PROCESSOR_COUNT "$ENV{NUMBER_OF_PROCESSORS}") - endif() -endif() - -message(STATUS "Number of core ${PROCESSOR_COUNT}") \ No newline at end of file