mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
build: third-party: enable CXX language earlier (#10862)
This is required for `CMAKE_CXX_COMPILER` to be set already, not only
after including third-party/cmake/BuildGperf.cmake.
Closes https://github.com/neovim/neovim/pull/10860.
Ref: 31f879983f
This commit is contained in:
parent
4cedc8444e
commit
a851090dec
12
third-party/CMakeLists.txt
vendored
12
third-party/CMakeLists.txt
vendored
@ -97,11 +97,19 @@ else()
|
||||
set(DEPS_C_COMPILER "${CMAKE_C_COMPILER}")
|
||||
endif()
|
||||
|
||||
set(DEPS_CXX_COMPILER "${CMAKE_CXX_COMPILER}")
|
||||
if(USE_BUNDLED_GPERF)
|
||||
enable_language(CXX)
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER)
|
||||
set(DEPS_CXX_COMPILER "${CMAKE_CXX_COMPILER}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_OSX_SYSROOT)
|
||||
set(DEPS_C_COMPILER "${DEPS_C_COMPILER} -isysroot${CMAKE_OSX_SYSROOT}")
|
||||
set(DEPS_CXX_COMPILER "${DEPS_CXX_COMPILER} -isysroot${CMAKE_OSX_SYSROOT}")
|
||||
if(DEPS_CXX_COMPILER)
|
||||
set(DEPS_CXX_COMPILER "${DEPS_CXX_COMPILER} -isysroot${CMAKE_OSX_SYSROOT}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Cross compiling: use these for dependencies built for the
|
||||
|
1
third-party/cmake/BuildGperf.cmake
vendored
1
third-party/cmake/BuildGperf.cmake
vendored
@ -2,7 +2,6 @@
|
||||
# cross compiling we still want to build for the HOST system, whenever
|
||||
# writing a recipe that is meant for cross-compile, use the HOSTDEPS_* variables
|
||||
# instead of DEPS_* - check the main CMakeLists.txt for a list.
|
||||
enable_language(CXX)
|
||||
|
||||
# BuildGperf(CONFIGURE_COMMAND ... BUILD_COMMAND ... INSTALL_COMMAND ...)
|
||||
# Reusable function to build Gperf, wraps ExternalProject_Add.
|
||||
|
Loading…
Reference in New Issue
Block a user