From 66831da9d7eacdecc8c8bad2fdeb963494ea1424 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 18 Dec 2012 10:21:45 +0100 Subject: [PATCH] Avoid to compile files when they're not needed. --- buildtools/Cmake/DefinePackages.cmake | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/buildtools/Cmake/DefinePackages.cmake b/buildtools/Cmake/DefinePackages.cmake index 5f4102b6c3..2f074b3ad8 100644 --- a/buildtools/Cmake/DefinePackages.cmake +++ b/buildtools/Cmake/DefinePackages.cmake @@ -461,16 +461,38 @@ endif() set(simgrid_sources ${BINDINGS_SRC} ${GTNETS_USED} - ${JEDULE_SRC} ${MSG_SRC} ${SIMDAG_SRC} ${SIMGRID_SRC} ${SIMIX_SRC} ${SURF_SRC} - ${TRACING_SRC} ${XBT_SRC} ) +if(${HAVE_JEDULE}) + set(simgrid_sources + ${simgrid_sources} + ${JEDULE_SRC} + ) +else() + set(EXTRA_DIST + ${EXTRA_DIST} + ${JEDULE_SRC} + ) +endif() + +if(${HAVE_TRACING}) + set(simgrid_sources + ${simgrid_sources} + ${TRACING_SRC} + ) +else() + set(EXTRA_DIST + ${EXTRA_DIST} + ${TRACING_SRC} + ) +endif() + if(HAVE_MC) set(simgrid_sources ${simgrid_sources} -- 2.20.1