Fossil SCM
Unconditionally disable compile_commands.json generation for out-of-tree builds, in an attempt to work around a problem reported in [forum:d19061d09a8179|forum post d19061d09a8179].
Commit
35f3e5bfba482db9e7e092e762cb58446fd5befd456f91a7f56fb3cf81742168
Parent
355a81bea7e40da…
1 file changed
+14
-1
M
auto.def
+14
-1
| --- auto.def | ||
| +++ auto.def | ||
| @@ -44,10 +44,16 @@ | ||
| 44 | 44 | # to compare the one they have against the minimum required |
| 45 | 45 | if {[opt-bool print-minimum-sqlite-version]} { |
| 46 | 46 | puts [get-define MINIMUM_SQLITE_VERSION] |
| 47 | 47 | exit 0 |
| 48 | 48 | } |
| 49 | + | |
| 50 | +set outOfTreeBuild 0 | |
| 51 | +if {![file exists fossil.1]} { | |
| 52 | + puts "This appears to be an out-of-tree build." | |
| 53 | + set outOfTreeBuild 1 | |
| 54 | +} | |
| 49 | 55 | |
| 50 | 56 | # sqlite wants these types if possible |
| 51 | 57 | cc-with {-includes {stdint.h inttypes.h}} { |
| 52 | 58 | cc-check-types uint32_t uint16_t int16_t uint8_t |
| 53 | 59 | } |
| @@ -760,11 +766,18 @@ | ||
| 760 | 766 | return 0 |
| 761 | 767 | } |
| 762 | 768 | } |
| 763 | 769 | } |
| 764 | 770 | |
| 765 | -check-compile-commands | |
| 771 | +if {!$outOfTreeBuild} { | |
| 772 | + check-compile-commands | |
| 773 | +} else { | |
| 774 | + define MAKE_COMPILATION_DB no | |
| 775 | + puts "Disabling compile_commands.json check for out-of-tree build." | |
| 776 | + # This is an attempt to resolve the problem reported at | |
| 777 | + # https://fossil-scm.org/forum/forumpost/d19061d09a8179d0 | |
| 778 | +} | |
| 766 | 779 | |
| 767 | 780 | # Add -fsanitize compile and link options late: we don't want the C |
| 768 | 781 | # checks above to run with those sanitizers enabled. It can not only |
| 769 | 782 | # be pointless, it can actually break correct tests. |
| 770 | 783 | set fsan [opt-val with-sanitizer] |
| 771 | 784 |
| --- auto.def | |
| +++ auto.def | |
| @@ -44,10 +44,16 @@ | |
| 44 | # to compare the one they have against the minimum required |
| 45 | if {[opt-bool print-minimum-sqlite-version]} { |
| 46 | puts [get-define MINIMUM_SQLITE_VERSION] |
| 47 | exit 0 |
| 48 | } |
| 49 | |
| 50 | # sqlite wants these types if possible |
| 51 | cc-with {-includes {stdint.h inttypes.h}} { |
| 52 | cc-check-types uint32_t uint16_t int16_t uint8_t |
| 53 | } |
| @@ -760,11 +766,18 @@ | |
| 760 | return 0 |
| 761 | } |
| 762 | } |
| 763 | } |
| 764 | |
| 765 | check-compile-commands |
| 766 | |
| 767 | # Add -fsanitize compile and link options late: we don't want the C |
| 768 | # checks above to run with those sanitizers enabled. It can not only |
| 769 | # be pointless, it can actually break correct tests. |
| 770 | set fsan [opt-val with-sanitizer] |
| 771 |
| --- auto.def | |
| +++ auto.def | |
| @@ -44,10 +44,16 @@ | |
| 44 | # to compare the one they have against the minimum required |
| 45 | if {[opt-bool print-minimum-sqlite-version]} { |
| 46 | puts [get-define MINIMUM_SQLITE_VERSION] |
| 47 | exit 0 |
| 48 | } |
| 49 | |
| 50 | set outOfTreeBuild 0 |
| 51 | if {![file exists fossil.1]} { |
| 52 | puts "This appears to be an out-of-tree build." |
| 53 | set outOfTreeBuild 1 |
| 54 | } |
| 55 | |
| 56 | # sqlite wants these types if possible |
| 57 | cc-with {-includes {stdint.h inttypes.h}} { |
| 58 | cc-check-types uint32_t uint16_t int16_t uint8_t |
| 59 | } |
| @@ -760,11 +766,18 @@ | |
| 766 | return 0 |
| 767 | } |
| 768 | } |
| 769 | } |
| 770 | |
| 771 | if {!$outOfTreeBuild} { |
| 772 | check-compile-commands |
| 773 | } else { |
| 774 | define MAKE_COMPILATION_DB no |
| 775 | puts "Disabling compile_commands.json check for out-of-tree build." |
| 776 | # This is an attempt to resolve the problem reported at |
| 777 | # https://fossil-scm.org/forum/forumpost/d19061d09a8179d0 |
| 778 | } |
| 779 | |
| 780 | # Add -fsanitize compile and link options late: we don't want the C |
| 781 | # checks above to run with those sanitizers enabled. It can not only |
| 782 | # be pointless, it can actually break correct tests. |
| 783 | set fsan [opt-val with-sanitizer] |
| 784 |