Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix smpi compile failed.
[simgrid.git] / buildtools / CPACK / src / CMakeMakeExeLib.txt
index 084ca7d..3b95bed 100644 (file)
@@ -1,29 +1,39 @@
 ### Make Libs
-add_library(simgrid SHARED ${simgrid_sources})
-add_library(gras SHARED ${gras_sources})
-add_library(smpi SHARED ${SMPI_SRC})
 
-set(GRAS_DEP "")
+include(${PROJECT_DIRECTORY}/CPACK/src/CMakeFLEXml.txt)
+
+if(supernovae)
+       include(${PROJECT_DIRECTORY}/CPACK/src/CMakeSupernovae.txt)
+else(supernovae)
+       add_library(simgrid SHARED ${simgrid_sources})
+       add_library(gras SHARED ${gras_sources})
+       add_library(smpi STATIC ${SMPI_SRC})
+endif(supernovae)
+
+set(GRAS_DEP "pthread")
 set(SIMGRID_DEP "")
+if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+       set(SIMGRID_DEP "-D_XOPEN_SOURCE")
+endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+
 
 if(pthread)
        if(with_context MATCHES pthread)
                SET(SIMGRID_DEP pthread)
                SET(ESPACE " ")
        endif(with_context MATCHES pthread)
-
+       
        if(with_context MATCHES windows)
-       elseif(with_context MATCHES windows)
-               SET(GRAS_DEP pthread)   
+               SET(GRAS_DEP "")
        endif(with_context MATCHES windows)
 endif(pthread)
 
 if(HAVE_LUA)
-       SET(SIMGRID_DEP "${SIMGRID_DEP}${ESPACE}dl lua5.1")
+       SET(SIMGRID_DEP "${SIMGRID_DEP}${ESPACE}-ldl -llua5.1")
 endif(HAVE_LUA)
 
 if(HAVE_GTNETS)
-       SET(SIMGRID_DEP_GTNETS "gtnets")
+       SET(SIMGRID_DEP_GTNETS "gtnets ")
 endif(HAVE_GTNETS)
 
 message("SIMGRID_DEP \"${SIMGRID_DEP}\"")
@@ -32,8 +42,8 @@ message("GRAS_DEP \"${GRAS_DEP}\"")
 ### Add definitions for compile
 set(CMAKE_CXX_FLAGS "-fprofile-arcs -ftest-coverage")
 add_definitions (${INCLUDES} -fprofile-arcs -ftest-coverage)
-target_link_libraries(simgrid ${SIMGRID_DEP} ${SIMGRID_DEP_GTNETS} -fprofile-arcs)
-target_link_libraries(gras ${GRAS_DEP} pthread -fprofile-arcs)
+target_link_libraries(simgrid ${SIMGRID_DEP} ${SIMGRID_DEP_GTNETS}-fprofile-arcs)
+target_link_libraries(gras ${GRAS_DEP} -fprofile-arcs)
 target_link_libraries(smpi -fprofile-arcs)
 
 ### Make EXEs