View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015781CMakeCMakepublic2015-10-11 14:372016-03-07 09:12
ReporterJeeves 
Assigned To 
PrioritylowSeverityfeatureReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 3.3.2 
Target VersionCMake 3.5Fixed in VersionCMake 3.5 
Summary0015781: FindFlex should have a DEFINES_FILE option in analogue with FIndBison
DescriptionFlex, like Bison, has the option to use a custom header name (%option header-file="...") which if employed means that FLEX_TARGET built files don't get properly cleaned.

To fix this, the macro FLEX_TARGET should have the same DEFINES_FILE option as BISON_TARGET, to override the default header file name.
TagsNo tags attached.
Attached Filesdiff file icon flex-target-header-support.diff [^] (5,051 bytes) 2015-10-11 16:22 [Show Content]
diff file icon flex-target-header-support-v2.diff [^] (5,934 bytes) 2015-10-11 16:43 [Show Content]
diff file icon flex-target-header-support-v3.diff [^] (7,506 bytes) 2015-10-17 12:37 [Show Content]
diff file icon flex-target-header-support-v4.diff [^] (7,281 bytes) 2015-10-17 12:55 [Show Content]
diff file icon flex-target-header-support-v5.diff [^] (7,323 bytes) 2015-10-19 13:00 [Show Content]

 Relationships

  Notes
(0039565)
Jeeves (reporter)
2015-10-11 16:22
edited on: 2015-10-11 16:23

Added a diff for this feature. Also, fix a couple of minor spelling errors.

(0039566)
Jeeves (reporter)
2015-10-11 16:43

Added a second version of the diff, since I noticed I forgot to update the runtime macro usage. Sigh.
(0039574)
Brad King (manager)
2015-10-12 10:53

Thanks! Please split the patch up to port to cmake_parse_arguments first and then make the functional change. The updates to FindBISON were done the same way:

 FindBISON: Use CMAKE_PARSE_ARGUMENTS to parse arguments
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb859263 [^]

 FindBISON: Add DEFINES_FILE option to pass --defines=FILE
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=12e534c2 [^]
(0039623)
Jeeves (reporter)
2015-10-17 12:38

Uploaded a new version of the diff with commits separated in to adding CMAKE_PARSE_ARGUMENTS and the functional change. Sorry it took so long, I was rather busy this week.
(0039624)
Jeeves (reporter)
2015-10-17 12:56

... and as soon as I upload it, I spot a problem with it. Uploaded a new version that's actually correct.
(0039629)
Brad King (manager)
2015-10-19 09:58

Thanks. I just noticed that the change does not actually modify the flex command invoked. Is this just about getting the already-generated file to be listed as an output of the custom command?
(0039634)
Jeeves (reporter)
2015-10-19 11:27
edited on: 2015-10-19 11:33

Yes. It assumes that either you've specified the header output file name in the flex source file with %option header-file or you're passing the --header-file command line option with COMPILE_FLAGS. I could modify it to add the --header-file option to the command line if you think that's best, which I guess would decrease redundancy at the cost of also reducing flexibility.

(0039636)
Brad King (manager)
2015-10-19 11:44

Re 0015781:0039634: The bison version passes an explicit --defines=... option using the DEFINES_FILE argument value. I see no equivalent to this change here. Shouldn't we add --header-file= ?
(0039637)
Jeeves (reporter)
2015-10-19 11:52

I guess thinking about it, probably. I'm mostly going by my own usage since I specify all the command line options in the source file, given that there are quite a few of them. The only thing is that options specified in the source actually override options specified on the command line, which is a little counter-intuitive. I'll fix it.
(0039638)
Jeeves (reporter)
2015-10-19 13:00

Done.
(0039639)
Brad King (manager)
2015-10-19 13:20

Thanks. Applied with minor tweaks:

 FindFLEX: Use CMAKE_PARSE_ARGUMENTS to parse arguments
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=30710b8d [^]

 FindFLEX: Fix typo in ADD_FLEX_BISON_DEPENDENCY errors
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c26ff8a9 [^]

 FindFLEX: Add a DEFINES_FILE option to specify flex-generated header
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=db3d8505 [^]
(0040624)
Robert Maynard (manager)
2016-03-07 09:12

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2015-10-11 14:37 Jeeves New Issue
2015-10-11 16:22 Jeeves File Added: flex-target-header-support.diff
2015-10-11 16:22 Jeeves Note Added: 0039565
2015-10-11 16:23 Jeeves Note Edited: 0039565
2015-10-11 16:43 Jeeves File Added: flex-target-header-support-v2.diff
2015-10-11 16:43 Jeeves Note Added: 0039566
2015-10-12 10:53 Brad King Note Added: 0039574
2015-10-17 12:37 Jeeves File Added: flex-target-header-support-v3.diff
2015-10-17 12:38 Jeeves Note Added: 0039623
2015-10-17 12:55 Jeeves File Added: flex-target-header-support-v4.diff
2015-10-17 12:56 Jeeves Note Added: 0039624
2015-10-19 09:58 Brad King Note Added: 0039629
2015-10-19 11:27 Jeeves Note Added: 0039634
2015-10-19 11:29 Jeeves Note Edited: 0039634
2015-10-19 11:33 Jeeves Note Edited: 0039634
2015-10-19 11:44 Brad King Note Added: 0039636
2015-10-19 11:52 Jeeves Note Added: 0039637
2015-10-19 13:00 Jeeves File Added: flex-target-header-support-v5.diff
2015-10-19 13:00 Jeeves Note Added: 0039638
2015-10-19 13:20 Brad King Note Added: 0039639
2015-10-19 13:20 Brad King Status new => resolved
2015-10-19 13:20 Brad King Resolution open => fixed
2015-10-19 13:20 Brad King Fixed in Version => CMake 3.5
2015-10-19 13:20 Brad King Target Version => CMake 3.5
2016-03-07 09:12 Robert Maynard Note Added: 0040624
2016-03-07 09:12 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team