Hi, I'm using cmake with something like that
add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/gen.f90" COMMAND bash ARGS "${CMAKE_SOURCE_DIR}/gen.f90.sh" ">" "${CMAKE_BINARY_DIR}/gen.f90" MAIN_DEPENDENCY "${CMAKE_SOURCE_DIR}/gen.f90.sh" VERBATIM ) add_library(mylib STATIC usegen.f90 "${CMAKE_BINARY_DIR}/gen.f90") gen.f90 defines a module gen_module and usegen uses this module unfortunately cmake doesn't seem to catch the dependency and tries to compile usegen.f90 before gen.f90 resulting in an error of missing gen_module.mod I've tried to set the gen.f90 property GENERATED to TRUE but this does not seem to have any effect ... Could someone give me some hint to understand what I'm doing wrong ? Regards, -- Julien Bigot, Ph.D. -- http://work.julien-bigot.fr Maison de la Simulation USR 3441 - bât. 565 - CEA Saclay 91191 Gif-sur-Yvette CEDEX - FRANCE phone: (+33) 1 69 08 01 75 -- xmpp: jbi...@jabber.org
signature.asc
Description: This is a digitally signed message part.
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake