dont set CMAKE_BUILD_TYPE for host builds, if a value has already been specified in the mmakefile.src options for the template.

This commit is contained in:
Kalamatee 2021-01-21 01:24:14 +00:00 committed by deadwood
parent a368932f8e
commit fed971198e
1 changed files with 5 additions and 3 deletions

View File

@ -3936,9 +3936,11 @@ ifeq (%(compiler),host)
BD_CFLAGS := $(HOST_CFLAGS) -I$(CROSSTOOLSDIR)/include %(extracflags)
BD_CXXFLAGS := $(HOST_CXXFLAGS) -I$(CROSSTOOLSDIR)/include %(extracxxflags)
BD_CPPFLAGS := $(HOST_CPPFLAGS) %(extracppflags)
%(mmake)-cmake_opts := -DCMAKE_INSTALL_PREFIX=$(%(mmake)-prefix) \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_LINKER="$(strip $(HOST_LD))" \
%(mmake)-cmake_opts := -DCMAKE_INSTALL_PREFIX=$(%(mmake)-prefix)
ifeq (,$(findstring CMAKE_BUILD_TYPE,%(extraoptions)))
%(mmake)-cmake_opts += --DCMAKE_BUILD_TYPE=Release
endif
%(mmake)-cmake_opts += -DCMAKE_LINKER="$(strip $(HOST_LD))" \
-DCMAKE_EXE_LINKER_FLAGS="$(strip $(BD_LDFLAGS))"
ifeq (%(useldlinker),yes)
%(mmake)-cmake_opts += -DCMAKE_CXX_LINK_EXECUTABLE="<CMAKE_LINKER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>"