From 393f3d0f7270953319ca95cc3d43097c85f85866 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 17 Jun 2016 09:09:14 -0400 Subject: [PATCH] Revert "[PERFORMANCE] Should now perform tests in parallel using the ctest -j flag according to how many cores there are in the system." This reverts commit 28f7704eea4445b5c1493a7514a2c97dea95b1d1. --- cmake/GtsamTesting.cmake | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/cmake/GtsamTesting.cmake b/cmake/GtsamTesting.cmake index 25d091e50..e13888c00 100644 --- a/cmake/GtsamTesting.cmake +++ b/cmake/GtsamTesting.cmake @@ -97,42 +97,10 @@ else() option(GTSAM_SINGLE_TEST_EXE "Combine unit tests into single executable (faster compile)" OFF) endif() mark_as_advanced(GTSAM_SINGLE_TEST_EXE) -#Parallelize CTests since ctest supports the -j command -#Get number of cores from here: https://cmake.org/pipermail/cmake/2010-October/040122.html -if(NOT DEFINED PROCESSOR_COUNT) - # Unknown: - set(PROCESSOR_COUNT 0) - - # 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() - -if(PROCESSOR_COUNT) - set(CTEST_BUILD_FLAGS "-j${PROCESSOR_COUNT}") -endif() # Enable make check (http://www.cmake.org/Wiki/CMakeEmulateMakeCheck) if(GTSAM_BUILD_TESTS) - add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} ${CTEST_BUILD_FLAGS} -C $ --output-on-failure) + add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -C $ --output-on-failure) endif() # Add examples target