Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue 290 for which the default generator was always used by the bootstrapped YCM #294

Merged
merged 1 commit into from
Nov 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion modules/YCMEPHelper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1371,10 +1371,14 @@ macro(YCM_BOOTSTRAP)
file(READ ${YCM_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/YCMTmp/YCM-cfgcmd.txt _cmd)
string(STRIP "${_cmd}" _cmd)
string(REGEX REPLACE "^cmd='(.+)'" "\\1" _cmd "${_cmd}")
# The -DCMAKE_PREFIX_PATH in YCM-cfgcmd.txt uses | as list separator, so it is not
# usable as it is when invoking CMake from the config line. As YCM during bootstrap
# does not need to find any package via CMAKE_PREFIX_PATH, we just remove it
string(REGEX REPLACE "-DCMAKE_PREFIX_PATH:PATH=.+;-C" "-C" _cmd "${_cmd}")
# The cache file is generated with 'file(GENERATE)', therefore it is not yet
# available. Since we cannot use CMAKE_CACHE_ARGS or CMAKE_CACHE_DEFAULT_ARGS,
# We just remove it from the command line, and append the arguments instead.
string(REGEX REPLACE "-C.+\\.cmake;" "${_YCM_EP_CMAKE_CACHE_ARGS};${_YCM_EP_CMAKE_CACHE_DEFAULT_ARGS}" _cmd "${_cmd}")
string(REGEX REPLACE "-C.+\\.cmake;" "${_YCM_EP_CMAKE_CACHE_ARGS};${_YCM_EP_CMAKE_CACHE_DEFAULT_ARGS};" _cmd "${_cmd}")
# The command line contains location tags, therefore we need to expand it.
_ep_replace_location_tags(YCM _cmd)
execute_process(COMMAND ${_cmd}
Expand Down