← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2770: CHUNKSIZE option is added to CMakeLists

 

------------------------------------------------------------
revno: 2770
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: yade
timestamp: Mon 2011-02-28 09:29:21 +0100
message:
  CHUNKSIZE option is added to CMakeLists
modified:
  CMakeLists.txt


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2011-02-28 07:55:17 +0000
+++ CMakeLists.txt	2011-02-28 08:29:21 +0000
@@ -49,6 +49,13 @@
 	
 
 #set(CMAKE_VERBOSE_MAKEFILE 1)
+
+IF (NOT CHUNKSIZE)
+ SET(CHUNKSIZE 100)
+ MESSAGE("Maximum files to compile in one translation unit ${CHUNKSIZE}, if you want to override it use -DCHUNKSIZE option.")
+ENDIF (NOT CHUNKSIZE)
+
+
 IF (NOT INSTALL_PREFIX)
  SET(CMAKE_INSTALL_PREFIX "/usr/local")
  MESSAGE("Yade will be installed to default path ${CMAKE_INSTALL_PREFIX}, if you want to override it use -DINSTALL_PREFIX option.")
@@ -57,6 +64,7 @@
 	MESSAGE("Yade will be installed to ${CMAKE_INSTALL_PREFIX}")
 ENDIF (NOT CMAKE_INSTALL_PREFIX)
 
+
 SET(YADE_LIB_PATH ${CMAKE_INSTALL_PREFIX}/lib/yade-${SUFFIX})
 SET(YADE_EXEC_PATH ${CMAKE_INSTALL_PREFIX}/bin)
 SET(YADE_PY_PATH ${YADE_LIB_PATH}/py)
@@ -103,7 +111,7 @@
 			FILE(APPEND ${OUT} "#include<${CMAKE_SOURCE_DIR}/${SRC}>\n")
 		endif()
 		MATH(EXPR COUNTER "${COUNTER}+1")
-		IF(${COUNTER} GREATER ${MAXNUM})
+		IF(${COUNTER} EQUAL ${MAXNUM})
 			SET(COUNTER 0)
 			MATH(EXPR COMB_COUNTER ${COMB_COUNTER}+1)
 			SET(OUT "${BASE}.${COMB_COUNTER}.cpp")
@@ -125,8 +133,8 @@
 
 # the last number is "chunkSize"
 COMBINE_SOURCES(${CMAKE_BINARY_DIR}/core "${SRC_CORE}" 1000)
-COMBINE_SOURCES(${CMAKE_BINARY_DIR}/pkg "${SRC_PKG}" 100)
-COMBINE_SOURCES(${CMAKE_BINARY_DIR}/lib "${SRC_LIB}" 100)
+COMBINE_SOURCES(${CMAKE_BINARY_DIR}/pkg "${SRC_PKG}" ${CHUNKSIZE})
+COMBINE_SOURCES(${CMAKE_BINARY_DIR}/lib "${SRC_LIB}" ${CHUNKSIZE})
 FILE(GLOB SRC_CORE_COMBINED "${CMAKE_BINARY_DIR}/core.*.cpp")
 FILE(GLOB SRC_PKG_COMBINED  "${CMAKE_BINARY_DIR}/pkg.*.cpp")
 FILE(GLOB SRC_LIB_COMBINED  "${CMAKE_BINARY_DIR}/lib.*.cpp")