aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-03-22 18:22:56 +0200
committerRiccardo Spagni <ric@spagni.net>2018-03-22 18:22:56 +0200
commitd27f86041c90d0f260f5b62ef00d1367173d6bb9 (patch)
treefb297d1b13d10228a3953a470d9586f57f7820a1
parentMerge pull request #3465 (diff)
parentRevert bb19386b (diff)
downloadmonero-d27f86041c90d0f260f5b62ef00d1367173d6bb9.tar.xz
Merge pull request #3467
1d79c14d Revert bb19386b (Howard Chu) 522be96f Fix generating version.cpp (Howard Chu)
-rw-r--r--README.md2
-rw-r--r--cmake/Version.cmake6
2 files changed, 5 insertions, 3 deletions
diff --git a/README.md b/README.md
index fa6f18dc6..db1daf4c3 100644
--- a/README.md
+++ b/README.md
@@ -167,7 +167,7 @@ library archives (`.a`).
| Dep | Min. version | Vendored | Debian/Ubuntu pkg | Arch pkg | Fedora | Optional | Purpose |
| ------------ | ------------- | -------- | ------------------ | ------------ | ----------------- | -------- | -------------- |
| GCC | 4.7.3 | NO | `build-essential` | `base-devel` | `gcc` | NO | |
-| CMake | 3.2.0 | NO | `cmake` | `cmake` | `cmake` | NO | |
+| CMake | 3.0.0 | NO | `cmake` | `cmake` | `cmake` | NO | |
| pkg-config | any | NO | `pkg-config` | `base-devel` | `pkgconf` | NO | |
| Boost | 1.58 | NO | `libboost-all-dev` | `boost` | `boost-devel` | NO | C++ libraries |
| OpenSSL | basically any | NO | `libssl-dev` | `openssl` | `openssl-devel` | NO | sha256 sum |
diff --git a/cmake/Version.cmake b/cmake/Version.cmake
index 63b2a6790..439c4c5ae 100644
--- a/cmake/Version.cmake
+++ b/cmake/Version.cmake
@@ -37,14 +37,16 @@ if ("$Format:$" STREQUAL "")
write_static_version_header("release")
elseif (GIT_FOUND OR Git_FOUND)
message(STATUS "Found Git: ${GIT_EXECUTABLE}")
- add_custom_target(genversion ALL
+ add_custom_command(
+ OUTPUT "${CMAKE_BINARY_DIR}/version.cpp"
COMMAND "${CMAKE_COMMAND}"
"-D" "GIT=${GIT_EXECUTABLE}"
"-D" "TO=${CMAKE_BINARY_DIR}/version.cpp"
"-P" "cmake/GenVersion.cmake"
- BYPRODUCTS "${CMAKE_BINARY_DIR}/version.cpp"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
else()
message(STATUS "WARNING: Git was not found!")
write_static_version_header("unknown")
endif ()
+add_custom_target(genversion ALL
+ DEPENDS "${CMAKE_BINARY_DIR}/version.cpp")