mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Resolve CMAKE_* directories before saving as build defines
Since fish began resolving symlinks it broke the running-from-build-dir detection in fish.cpp if the build directory were a symlink (which is common on some platforms where the default user HOME directory is a symlink in the first place, e.g. FreeBSD).
This commit is contained in:
parent
09ca268d50
commit
d15de117b9
1 changed files with 4 additions and 2 deletions
|
@ -105,8 +105,10 @@ ADD_DEFINITIONS(-D_UNICODE=1
|
|||
INCLUDE(Version)
|
||||
|
||||
# Let fish pick up when we're running out of the build directory without installing
|
||||
ADD_DEFINITIONS(-DCMAKE_BINARY_DIR="${CMAKE_BINARY_DIR}")
|
||||
ADD_DEFINITIONS(-DCMAKE_SOURCE_DIR="${CMAKE_SOURCE_DIR}")
|
||||
GET_FILENAME_COMPONENT(REAL_CMAKE_BINARY_DIR "${CMAKE_BINARY_DIR}" REALPATH)
|
||||
GET_FILENAME_COMPONENT(REAL_CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}" REALPATH)
|
||||
ADD_DEFINITIONS(-DCMAKE_BINARY_DIR="${REAL_CMAKE_BINARY_DIR}")
|
||||
ADD_DEFINITIONS(-DCMAKE_SOURCE_DIR="${REAL_CMAKE_SOURCE_DIR}")
|
||||
|
||||
# Teach fish_version.o to rebuild when FBVF changes.
|
||||
# The standard C++ include detection machinery misses this.
|
||||
|
|
Loading…
Reference in a new issue