Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add local tests with pipol.
[simgrid.git] / buildtools / Cmake / DefinePackages.cmake
index 9d116b7..e9f76d7 100755 (executable)
@@ -195,9 +195,15 @@ set(XBT_SRC
        src/xbt/cunit.c
        src/xbt/graphxml_parse.c
        src/xbt/setset.c
-       src/xbt/mmalloc/mm.c
 )
 
+if(HAVE_MMAP)
+       set(XBT_SRC
+       ${XBT_SRC}
+       src/xbt/mmalloc/mm.c    
+       )
+endif(HAVE_MMAP)
+
 set(GTNETS_SRC 
        src/surf/gtnets/gtnets_simulator.cc
        src/surf/gtnets/gtnets_topology.cc
@@ -262,6 +268,13 @@ set(SIMDAG_SRC
        src/simdag/sd_workstation.c
        src/simdag/sd_daxloader.c
 )
+if(HAVE_CGRAPH_H)
+       set(SIMDAG_SRC
+               ${SIMDAG_SRC}
+               src/simdag/sd_dotloader.c
+       )
+
+endif(HAVE_CGRAPH_H)
 
 set(GRAS_COMMON_SRC
        src/gras/gras.c
@@ -342,7 +355,6 @@ set(MC_SRC
        src/mc/private.h
 )
 
-
 set(install_HEADERS
 include/xbt/misc.h
 include/xbt/sysdep.h
@@ -395,24 +407,23 @@ include/gras/timer.h
 include/amok/peermanagement.h
 include/amok/bandwidth.h
 include/instr/instr.h
-include/instr/tracing_config.h
 include/simgrid_config.h
 include/gras.h 
 include/xbt.h
 )
 
 set(TEST_UNITS
-cunit_unit.c
-ex_unit.c
-dynar_unit.c
-dict_unit.c
-set_unit.c
-swag_unit.c
-xbt_str_unit.c
-xbt_strbuff_unit.c
-xbt_sha_unit.c
-config_unit.c
-xbt_synchro_unit.c
+${PROJECT_DIRECTORY}/src/cunit_unit.c
+${PROJECT_DIRECTORY}/src/ex_unit.c
+${PROJECT_DIRECTORY}/src/dynar_unit.c
+${PROJECT_DIRECTORY}/src/dict_unit.c
+${PROJECT_DIRECTORY}/src/set_unit.c
+${PROJECT_DIRECTORY}/src/swag_unit.c
+${PROJECT_DIRECTORY}/src/xbt_str_unit.c
+${PROJECT_DIRECTORY}/src/xbt_strbuff_unit.c
+${PROJECT_DIRECTORY}/src/xbt_sha_unit.c
+${PROJECT_DIRECTORY}/src/config_unit.c
+${PROJECT_DIRECTORY}/src/xbt_synchro_unit.c
 )
 
 set(TEST_CFILES
@@ -429,33 +440,9 @@ src/xbt/config.c
 src/xbt/xbt_synchro.c
 )
 
-#Here must have all files which permit to generate source files
-set(SRC_TO_LOOK
-src/surf/simgrid.dtd
-src/xbt/graphxml.dtd
-src/simdag/dax.dtd
-examples/gras/ping/ping.xml
-examples/gras/rpc/rpc.xml
-examples/gras/spawn/spawn.xml
-examples/gras/timer/timer.xml
-examples/gras/chrono/chrono.xml
-examples/gras/mutual_exclusion/simple_token/simple_token.xml
-examples/gras/mmrpc/mmrpc.xml
-examples/gras/all2all/all2all.xml
-examples/gras/pmm/pmm.xml
-examples/gras/synchro/synchro.xml
-examples/gras/properties/properties.xml
-teshsuite/gras/msg_handle/msg_handle.xml
-teshsuite/gras/empty_main/empty_main.xml
-teshsuite/gras/small_sleep/small_sleep.xml
-examples/amok/bandwidth/bandwidth.xml
-examples/amok/saturate/saturate.xml
-${TEST_CFILES}
-)
-
 ### depend of some variables setted upper
 # -->CONTEXT_THREADS
-if(${CONTEXT_THREADS})
+if(${CONTEXT_THREADS} OR WIN32)
        set(SURF_SRC
                ${SURF_SRC}
                src/xbt/xbt_os_thread.c
@@ -465,7 +452,7 @@ if(${CONTEXT_THREADS})
                ${EXTRA_DIST}
                src/simix/smx_context_sysv.c
        )
-else(${CONTEXT_THREADS})
+else(${CONTEXT_THREADS} OR WIN32)
        set(SURF_SRC
                ${SURF_SRC}
                src/simix/smx_context_sysv.c
@@ -475,7 +462,7 @@ else(${CONTEXT_THREADS})
                src/xbt/xbt_os_thread.c
                src/simix/smx_context_thread.c
        )
-endif(${CONTEXT_THREADS})
+endif(${CONTEXT_THREADS} OR WIN32)
 
 # -->HAVE_GTNETS
 if(HAVE_GTNETS)
@@ -507,9 +494,15 @@ set(simgrid_sources
        ${GRAS_COMMON_SRC}
        ${GRAS_SG_SRC}
        ${AMOK_SRC}
-       ${MC_SRC}
 )
 
+if(HAVE_MC)
+       set(simgrid_sources
+               ${simgrid_sources}
+               ${MC_SRC}
+               )
+endif(HAVE_MC)
+
 ### Gras Lib sources
 set(gras_sources
        ${XBT_SRC}
@@ -757,7 +750,6 @@ set(source_to_pack
        buildtools/Cmake/test_prog/prog_va_copy.c
        buildtools/Cmake/test_prog/prog_vsnprintf.c
        buildtools/Cmake/gras_config.h.in
-       buildtools/Cmake/tracing_config.h.in
        AUTHORS
        ChangeLog
        COPYING