Fix bug 3120 and bug 3154 #46
Συγχωνευμένα
MicheleC
συγχώνευσε 3 υποβολές από bug/3120/holidays σε master 4 έτη πριν
Φόρτωση…
Αναφορά σε νέο ζήτημα
Δεν υπάρχει ακόμα περιεχόμενο.
Διαγραφή του Κλάδου 'bug/3120/holidays'
Η διαγραφή του κλάδου είναι μόνιμη. ΔΕΝ ΜΠΟΡΕΙ να αναιρεθεί. Συνέχεια;
Here are some comments to resolve.
add_custom_command(OUTPUT parseholiday.c parseholiday.hCOMMAND bison -p kcal -d -o ${CMAKE_CURRENT_BINARY_DIR}/parseholiday.c parseholiday.yIt is necessary to add bison and flex detection – see for example TDE/kscope.
At the same time, it is better to keep the binary as the active directory and use
${CMAKE_CURRENT_SOURCE_DIR}to specify the source file – see also TDE/kscope. Flex and bison can generate some temporary files, and it's a good idea to generate them in a binary directory, because the source directory can be read-only and should remain intact. This applies, for example, to a generated fileparseholiday.h.add_custom_command(OUTPUT scanholiday.cCOMMAND lex -Pkcal -B -i -o ${CMAKE_CURRENT_BINARY_DIR}/scanholiday.c scanholiday.lexSame note as above.
)add_custom_target(file_generationTarget names are unique throughout the whole project. Therefore
file_generationis not a good choice – it should be more accurate, for exampleholiday_parser_generated.Thanks for the comments Slavek, will update in a while
All three issues addressed in newer version. I also separated out the fix for the FTBFS into its own commit.
Just a small note…
add_custom_command(OUTPUT parseholiday.c parseholiday.hCOMMAND ${BISON_EXECUTABLE} -p kcal -d -o parseholiday.c ${CMAKE_CURRENT_SOURCE_DIR}/parseholiday.yWORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}CMAKE_CURRENT_BINARY_DIRis the defaultWORKING_DIRECTORY=> it does not need to be specified.Updated 😄
It seems good.
Build successfully tested on Wheezy, Stretch and FreeBSD.
f95037bc26σε master 4 έτη πρινΕξεταστές
f95037bc26.