|
|
@ -20,5 +20,13 @@ if( _result )
|
|
|
|
tde_message_fatal( "Unable to run getconf!\n MAX_CMD_LENGTH cannot be determined." )
|
|
|
|
tde_message_fatal( "Unable to run getconf!\n MAX_CMD_LENGTH cannot be determined." )
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
math( EXPR MAX_CMD_LENGTH "(${MAX_CMD_LENGTH} / 4) * 3" )
|
|
|
|
math( EXPR MAX_CMD_LENGTH "(${MAX_CMD_LENGTH} / 4) * 3" )
|
|
|
|
|
|
|
|
# Work around a 64 bit bug in the CMake math function above
|
|
|
|
|
|
|
|
if( NOT MAX_CMD_LENGTH )
|
|
|
|
|
|
|
|
execute_process(
|
|
|
|
|
|
|
|
COMMAND getconf ARG_MAX
|
|
|
|
|
|
|
|
OUTPUT_VARIABLE MAX_CMD_LENGTH
|
|
|
|
|
|
|
|
RESULT_VARIABLE _result
|
|
|
|
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE )
|
|
|
|
|
|
|
|
endif()
|
|
|
|
message( STATUS " found ${MAX_CMD_LENGTH}" )
|
|
|
|
message( STATUS " found ${MAX_CMD_LENGTH}" )
|
|
|
|
set( MAX_CMD_LENGTH ${MAX_CMD_LENGTH} CACHE INTERNAL "" FORCE )
|
|
|
|
set( MAX_CMD_LENGTH ${MAX_CMD_LENGTH} CACHE INTERNAL "" FORCE )
|
|
|
|