diff options
Diffstat (limited to 'certmanager/ConfigureChecks.cmake')
-rw-r--r-- | certmanager/ConfigureChecks.cmake | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/certmanager/ConfigureChecks.cmake b/certmanager/ConfigureChecks.cmake new file mode 100644 index 000000000..fc51483e8 --- /dev/null +++ b/certmanager/ConfigureChecks.cmake @@ -0,0 +1,22 @@ +################################################# +# +# (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 +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" ) +set( MAX_CMD_LENGTH ${MAX_CMD_LENGTH} CACHE INTERNAL "" FORCE ) |