[kdepim]: initial cmake support for following subpackages: akregator, certmanager, kaddressbook, kalarm, kioslaves, kmail, ktnef, libemailfunctions, libkcal, libkdenetwork, libkdepim, libkmime, libkpgp, libkpimidentities, libksieve, mimelib
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1223912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
14 years ago
|
|
|
#################################################
|
|
|
|
#
|
|
|
|
# (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" )
|
[kdepim]: initial cmake support for following subpackages: akregator, certmanager, kaddressbook, kalarm, kioslaves, kmail, ktnef, libemailfunctions, libkcal, libkdenetwork, libkdepim, libkmime, libkpgp, libkpimidentities, libksieve, mimelib
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1223912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
14 years ago
|
|
|
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" )
|
|
|
|
# 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}" )
|
[kdepim]: initial cmake support for following subpackages: akregator, certmanager, kaddressbook, kalarm, kioslaves, kmail, ktnef, libemailfunctions, libkcal, libkdenetwork, libkdepim, libkmime, libkpgp, libkpimidentities, libksieve, mimelib
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1223912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
14 years ago
|
|
|
set( MAX_CMD_LENGTH ${MAX_CMD_LENGTH} CACHE INTERNAL "" FORCE )
|