summaryrefslogtreecommitdiffstats
path: root/certmanager/ConfigureChecks.cmake
blob: 6148f05610d154154f50a2b46f891ec07ac5a663 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#################################################
#
#  (C) 2010-2011 Serghei Amelian
#  serghei (DOT) amelian (AT) gmail.com
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

# get MAX_CMD_LENGTH
message( STATUS "Checking for maximum argument length" )
execute_process(
  COMMAND getconf ARG_MAX
  OUTPUT_VARIABLE MAX_CMD_LENGTH
  RESULT_VARIABLE _result
  OUTPUT_STRIP_TRAILING_WHITESPACE )
if( _result )
  tde_message_fatal( "Unable to run getconf!\n MAX_CMD_LENGTH cannot be determined." )
endif()
math( EXPR MAX_CMD_LENGTH "(${MAX_CMD_LENGTH} / 4) * 3" )
message( STATUS "  found ${MAX_CMD_LENGTH}" )
set( MAX_CMD_LENGTH ${MAX_CMD_LENGTH} CACHE INTERNAL "" FORCE )