Creating an intentional memory leak to ensure valgrind is working

This commit is contained in:
Mark Berrill
2015-03-06 09:40:05 -05:00
parent 8a1bb62679
commit 03bd04aa30
2 changed files with 10 additions and 3 deletions

View File

@@ -112,10 +112,10 @@ IF( NOT DEFINED N_PROCS )
ENDIF()
# Mac:
IF(APPLE)
find_program(cmd_sys_pro "system_profiler")
find_program(cmd_sys_pro "sysctl")
if(cmd_sys_pro)
execute_process(COMMAND ${cmd_sys_pro} OUTPUT_VARIABLE info)
STRING(REGEX REPLACE "^.*Total Number of Cores: ([0-9]+).*$" "\\1" N_PROCS "${info}")
execute_process(COMMAND ${cmd_sys_pro} hw.physicalcpu OUTPUT_VARIABLE info)
STRING(REGEX REPLACE "^.*hw.physicalcpu: ([0-9]+).*$" "\\1" N_PROCS "${info}")
ENDIF()
ENDIF()
# Windows: