@ -23,6 +23,7 @@ include(RegisterSourceGroup)
include ( imported )
include ( CheckCXXSourceCompiles )
include ( CheckCSourceCompiles )
include ( ProcessorCount )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
@ -84,6 +85,17 @@ set(ADDITIONAL_LINK_DIRS "" CACHE STRING "Additional directories added to the li
set ( USE_XERCESC ${ XML_SUPPORT } )
mark_as_advanced ( USE_XERCESC )
# G e t a n a p p r o x i m a t i o n o f t h e n u m b e r o f a v a i l a b l e processors ( used for parallel build of shipped resources )
ProcessorCount ( STORM_RESOURCES_BUILD_JOBCOUNT_DEFAULT )
# T o b e s a f e , w e o n l y t a k e a l i t t l e m o r e t h a n h a l f o f t h e r e s o u r c e s .
# T h i s a l s o c o r r e c t l y d e a l s w i t h t h e c a s e w h e r e P r o c e s s o r C o u n t i s u n a b l e t o f i n d t h e c o r r e c t number ( and thus returns 0 )
MATH ( EXPR STORM_RESOURCES_BUILD_JOBCOUNT_DEFAULT "${STORM_RESOURCES_BUILD_JOBCOUNT_DEFAULT}/2 + 1" )
set ( STORM_RESOURCES_BUILD_JOBCOUNT "${STORM_RESOURCES_BUILD_JOBCOUNT_DEFAULT}" CACHE STRING "The number of jobs used when building external resources" )
mark_as_advanced ( STORM_RESOURCES_BUILD_JOBCOUNT )
if ( NOT STORM_RESOURCES_BUILD_JOBCOUNT GREATER 0 )
message ( FATAL_ERROR "STORM_RESOURCES_BUILD_JOBCOUNT must be a positive number. Got '${STORM_RESOURCES_BUILD_JOBCOUNT}' instead." )
endif ( )
# S e t s o m e C M A K E V a r i a b l e s a s a d v a n c e d
mark_as_advanced ( CMAKE_OSX_ARCHITECTURES )
mark_as_advanced ( CMAKE_OSX_SYSROOT )