Comment 4 for bug 1195802

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

Reopening. The problem is in fact not linked to flow engine. I think I spotted the problem in CMakeLists.txt, where yade library is never defined unless chunkSize=0 (code below). I really wonder why it works on different platforms, since nobody is typing -DCHUNKSIZE=0, I guess.

cmake ../trunk -DCHUNKSIZE=1
CMake Error at CMakeLists.txt:359 (TARGET_LINK_LIBRARIES):
  Cannot specify link libraries for target "yade" which is not built by this
  project.

cmake ../trunk -DCHUNKSIZE=0
--> ok

I 'm about to fix that Anton, but since you made this combination of core/lib/plugins, you maybe have suggestions?

Bruno

==============

IF (CHUNKSIZE)
  INCLUDE(CombineSources)

  COMBINE_SOURCES(${CMAKE_BINARY_DIR}/core "${SRC_CORE}" ${CHUNKSIZE})
  FILE(GLOB SRC_CORE_COMBINED "${CMAKE_BINARY_DIR}/core.*.cpp")
  ADD_LIBRARY(core SHARED ${SRC_CORE_COMBINED})

  COMBINE_SOURCES(${CMAKE_BINARY_DIR}/pkg "${SRC_PKG}" ${CHUNKSIZE})
  FILE(GLOB SRC_PKG_COMBINED "${CMAKE_BINARY_DIR}/pkg.*.cpp")
  ADD_LIBRARY(plugins SHARED ${SRC_PKG_COMBINED})

  COMBINE_SOURCES(${CMAKE_BINARY_DIR}/lib "${SRC_LIB}" ${CHUNKSIZE})
  FILE(GLOB SRC_LIB_COMBINED "${CMAKE_BINARY_DIR}/lib.*.cpp")
  ADD_LIBRARY(support SHARED ${SRC_LIB_COMBINED})
ELSE (CHUNKSIZE)
  ADD_LIBRARY(yade SHARED ${SRC_CORE} ${SRC_PKG} ${SRC_LIB})
ENDIF (CHUNKSIZE)