diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-01-20 23:48:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-20 23:48:46 +0100 |
commit | 4c5c6ca8009dd68a68bc31caef509cb15ebef7ca (patch) | |
tree | 9085a57ff0fbfb3eeefea462ed53723ba48ad9c5 /cmake/GenerateVersion.cmake | |
parent | c41214c7d43038c872625c224ce59443127b692d (diff) | |
download | rneovim-4c5c6ca8009dd68a68bc31caef509cb15ebef7ca.tar.gz rneovim-4c5c6ca8009dd68a68bc31caef509cb15ebef7ca.tar.bz2 rneovim-4c5c6ca8009dd68a68bc31caef509cb15ebef7ca.zip |
build: various cmake fixes (#21902)
* build: various cmake refactors and simplifications
- Add STATUS keyword to message to ensure messages are shown in the
correct order.
- Remove DEPS_CXX_COMPILER as we don't rely on C++ for any of our
dependencies.
- Simplify how msgpack and luv configure options are constructed.
- Rely on the default installation for luv instead of manually passing
configure, build and install commands.
- Simplify return code conditional.
* build: remove CMAKE_OSX_ARCHITECTURES_ALT_SEP workaround
CMAKE_OSX_ARCHITECTURES_ALT_SEP was defined as a workaround to prevent
the shell from interpreting `;`, which CMake uses as a list separator.
However, the same thing can be achieved by instead passing
CMAKE_OSX_ARCHITECTURES as a cache variable instead, which is a more
idiomatic way of achieving the same thing.
* build: define CMAKE_BUILD_TYPE before adding it to BUILD_TYPE_STRING
The problem with the current setup is that CMAKE_BUILD_TYPE is defined
after BUILD_TYPE_STRING. BUILD_TYPE_STRING will then be empty on the
first run, meaning that dependencies are built without a build type.
However, since CMAKE_BUILD_TYPE is a cache variable its value will
persist in subsequent runs. On the second run BUILD_TYPE_STRING will
have the correct value, but it's a different value from the ones the
dependencies were built with. This will force some dependencies to be
built again.
Fixes https://github.com/neovim/neovim/issues/21672.
Diffstat (limited to 'cmake/GenerateVersion.cmake')
-rw-r--r-- | cmake/GenerateVersion.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/GenerateVersion.cmake b/cmake/GenerateVersion.cmake index 34993d9552..c092645140 100644 --- a/cmake/GenerateVersion.cmake +++ b/cmake/GenerateVersion.cmake @@ -7,7 +7,7 @@ execute_process( OUTPUT_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE RES) -if(RES AND NOT RES EQUAL 0) +if(RES) message(STATUS "Using NVIM_VERSION: ${NVIM_VERSION}") file(WRITE "${OUTPUT}" "") return() |