X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3a9a59b738162cb0c36779da79a674675c5a854b..e12909f73b3ab10d195c5156b0521d63c22caefd:/buildtools/Cmake/Supernovae.cmake diff --git a/buildtools/Cmake/Supernovae.cmake b/buildtools/Cmake/Supernovae.cmake index 2977eef39b..4e7c2f9a0c 100644 --- a/buildtools/Cmake/Supernovae.cmake +++ b/buildtools/Cmake/Supernovae.cmake @@ -8,6 +8,7 @@ set(simgrid_fragile_sources src/surf/surfxml_parse.c src/xbt/graphxml_parse.c src/simdag/sd_daxloader.c + ${GTNETS_USED} ) set(gras_fragile_sources src/gras/DataDesc/ddt_parse.yy.c @@ -19,37 +20,37 @@ set(gras_fragile_sources ##################################################### ### Rebuild the supernovae source files -if (PERL_EXECUTABLE AND enable_supernovae) # I need supernovae and can use it +if (enable_supernovae) # I need supernovae # supernovae files are generated. I promise - set_source_files_properties(${PROJECT_DIRECTORY}/src/supernovae_sg.c + set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_sg.c PROPERTIES GENERATED true) - set_source_files_properties(${PROJECT_DIRECTORY}/src/supernovae_gras.c + set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_gras.c PROPERTIES GENERATED true) - set_source_files_properties(${PROJECT_DIRECTORY}/src/supernovae_smpi.c + set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_smpi.c PROPERTIES GENERATED true) ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_sg.c - DEPENDS ${PROJECT_DIRECTORY}/src/mk_supernovae.pl ${simgrid_sources} - COMMAND perl ${PROJECT_DIRECTORY}/src/mk_supernovae.pl --out=${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_sg.c '--fragile=${simgrid_fragile_sources}' '${simgrid_sources}' - WORKING_DIRECTORY ${PROJECT_DIRECTORY} + DEPENDS ${CMAKE_HOME_DIRECTORY}/src/mk_supernovae.pl ${simgrid_sources} + COMMAND perl ${CMAKE_HOME_DIRECTORY}/src/mk_supernovae.pl --out=${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_sg.c '--fragile=${simgrid_fragile_sources}' '${simgrid_sources}' + WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY} COMMENT "Generating supernovae_sg.c" ) ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_gras.c - DEPENDS ${PROJECT_DIRECTORY}/src/mk_supernovae.pl ${gras_sources} - COMMAND perl ${PROJECT_DIRECTORY}/src/mk_supernovae.pl --out=${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_gras.c '--fragile=${gras_fragile_sources}' '${gras_sources}' - WORKING_DIRECTORY ${PROJECT_DIRECTORY} + DEPENDS ${CMAKE_HOME_DIRECTORY}/src/mk_supernovae.pl ${gras_sources} + COMMAND perl ${CMAKE_HOME_DIRECTORY}/src/mk_supernovae.pl --out=${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_gras.c '--fragile=${gras_fragile_sources}' '${gras_sources}' + WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY} COMMENT "Generating supernovae_gras.c" ) ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_smpi.c - DEPENDS ${PROJECT_DIRECTORY}/src/mk_supernovae.pl ${SMPI_SRC} - COMMAND perl ${PROJECT_DIRECTORY}/src/mk_supernovae.pl --out=${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_smpi.c '${SMPI_SRC}' - WORKING_DIRECTORY ${PROJECT_DIRECTORY} + DEPENDS ${CMAKE_HOME_DIRECTORY}/src/mk_supernovae.pl ${SMPI_SRC} + COMMAND perl ${CMAKE_HOME_DIRECTORY}/src/mk_supernovae.pl --out=${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_smpi.c '${SMPI_SRC}' + WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY} COMMENT "Generating supernovae_smpi.c" ) @@ -64,9 +65,5 @@ if (PERL_EXECUTABLE AND enable_supernovae) # I need supernovae and can use it set(SMPI_SRC ${CMAKE_CURRENT_BINARY_DIR}/src/supernovae_smpi.c) -else(PERL_EXECUTABLE AND enable_supernovae) # I need supernovae and can use it - if (enable_supernovae) - message(You need Perl to activate supernovae) - set(enable_supernovae 0) - endif(enable_supernovae) -endif(PERL_EXECUTABLE AND enable_supernovae) # I need supernovae and can use it + +endif(enable_supernovae) # I need supernovae