Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add flags for gtnets examples.
[simgrid.git] / buildtools / CPACK / src / CMakeMakeExeLib.txt
index 6314b7e..bfeb0e6 100644 (file)
@@ -15,14 +15,13 @@ set(SIMGRID_DEP "")
 set(SMPI_DEP "")
 
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
-       set(SIMGRID_DEP "-D_XOPEN_SOURCE")
-       set(SMPI_DEP "-D_XOPEN_SOURCE")
+       add_definitions("-D_XOPEN_SOURCE")
 endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
 
 
 if(pthread)
        if(with_context MATCHES pthread)
-               SET(SIMGRID_DEP pthread)
+               SET(SIMGRID_DEP ${SIMGRID_DEP}pthread)
                SET(ESPACE " ")
        endif(with_context MATCHES pthread)
        
@@ -44,9 +43,9 @@ endif(HAVE_GTNETS)
 #set(CMAKE_C_FLAGS "-fprofile-arcs -ftest-coverage")
 
 #add_definitions (-fprofile-arcs -ftest-coverage)
-target_link_libraries(simgrid ${SIMGRID_DEP} ${SIMGRID_DEP_GTNETS}-fprofile-arcs)
-target_link_libraries(gras ${GRAS_DEP} -fprofile-arcs)
-target_link_libraries(smpi ${SMPI_DEP} -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     ${SMPI_DEP} -fprofile-arcs)
 
 ### Make EXEs
 
@@ -102,6 +101,7 @@ if(NOT init)
        add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/masterslave)
        add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/trace)
        if(HAVE_GTNETS)
+               add_definitions("-lgtnets -L${gtnets_path}/lib -I${gtnets_path}/include/gtnets")
                add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/gtnets)
        endif(HAVE_GTNETS)