diff options
author | Brion Vibber <brion@pobox.com> | 2020-01-30 10:11:23 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-30 10:11:23 -0800 |
commit | cd8d82910d229aa8357eb18882745397f6ed87eb (patch) | |
tree | 4a5127a5fad370f7fd49afa79a266d6b054a9c86 /src | |
parent | 9384ff68eea8090578354bab35fce2e621a588c4 (diff) | |
download | binaryen-cd8d82910d229aa8357eb18882745397f6ed87eb.tar.gz binaryen-cd8d82910d229aa8357eb18882745397f6ed87eb.tar.bz2 binaryen-cd8d82910d229aa8357eb18882745397f6ed87eb.zip |
Fix for cmake 3.10 (eg on Ubuntu LTS) (#2632)
CMAKE_PROJECT_VERSION is only predefined on cmake 3.12 and later,
so the previous code produced an empty version number which leads
to parsing errors when emcc checks the version.
Use of the older PROJECT_VERSION variable as the source of the
original version works here, as there's only one toplevel project
defined.
Diffstat (limited to 'src')
-rw-r--r-- | src/support/command-line.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/support/command-line.cpp b/src/support/command-line.cpp index e4dff8aad..2bdcd7c71 100644 --- a/src/support/command-line.cpp +++ b/src/support/command-line.cpp @@ -58,7 +58,7 @@ Options::Options(const std::string& command, const std::string& description) "Output version information and exit", Arguments::Zero, [command](Options*, const std::string&) { - std::cout << command << " version " << CMAKE_PROJECT_VERSION << "\n"; + std::cout << command << " version " << PROJECT_VERSION << "\n"; exit(0); }); add("--help", |