Skip to content

Commit 6913fb7

Browse files
committed
Add cmake -E env to the remaining command_wrapper.
1 parent db04a93 commit 6913fb7

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

CMakeLists.txt

+6-5
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ function(toolchain_deps toolchain_deps_dir toolchain_install_dir toolchain_suffi
284284
GIT_REPOSITORY https://github.com/Meinersbur/isl
285285
GIT_TAG isl-${ISL_VERSION}
286286
DOWNLOAD_DIR ${DOWNLOAD_DIR}
287-
CONFIGURE_COMMAND cd <SOURCE_DIR> && ./autogen.sh COMMAND ${compiler_flags} ${wrapper_command} <SOURCE_DIR>/configure
287+
CONFIGURE_COMMAND cd <SOURCE_DIR> && ./autogen.sh
288+
COMMAND ${CMAKE_COMMAND} -E env ${compiler_flags} ${wrapper_command} <SOURCE_DIR>/configure
288289
--build=${build_native}
289290
--host=${toolchain_host}
290291
--prefix=${toolchain_deps_dir}
@@ -297,7 +298,7 @@ function(toolchain_deps toolchain_deps_dir toolchain_install_dir toolchain_suffi
297298
URL https://github.com/libexpat/libexpat/releases/download/R_2_3_0/expat-${EXPAT_VERSION}.tar.bz2
298299
URL_HASH ${EXPAT_HASH}
299300
DOWNLOAD_DIR ${DOWNLOAD_DIR}
300-
CONFIGURE_COMMAND ${compiler_flags} ${wrapper_command} <SOURCE_DIR>/configure
301+
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env ${compiler_flags} ${wrapper_command} <SOURCE_DIR>/configure
301302
--build=${build_native}
302303
--host=${toolchain_host}
303304
--prefix=${toolchain_deps_dir}
@@ -569,7 +570,7 @@ ExternalProject_Add(newlib
569570
GIT_TAG ${NEWLIB_TAG}
570571
${GIT_SHALLOW_SUPPORT}
571572
# Pass the compiler_target_tools here so newlib picks up the fresh gcc-base compiler
572-
CONFIGURE_COMMAND ${compiler_flags} ${toolchain_tools} ${compiler_target_tools}
573+
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env ${compiler_flag} ${toolchain_tools} ${compiler_target_tools}
573574
${wrapper_command} <SOURCE_DIR>/configure "CFLAGS_FOR_TARGET=-g -O2 -ffunction-sections -fdata-sections"
574575
--build=${build_native}
575576
--host=${host_native}
@@ -583,7 +584,7 @@ ExternalProject_Add(newlib
583584
--enable-newlib-long-time_t
584585
--disable-nls
585586
--enable-newlib-iconv
586-
BUILD_COMMAND ${compiler_flags} ${toolchain_tools} ${wrapper_command} $(MAKE)
587+
BUILD_COMMAND ${CMAKE_COMMAND} -E env ${compiler_flags} ${toolchain_tools} ${wrapper_command} $(MAKE)
587588
INSTALL_COMMAND $(MAKE) install DESTDIR=${CMAKE_INSTALL_PREFIX}
588589
# Install a copy of newlib in the toolchain directory (required for pthread-embedded target)
589590
COMMAND $(MAKE) install DESTDIR=${toolchain_build_install_dir}
@@ -641,7 +642,7 @@ ExternalProject_Add(pthread-embedded
641642
# TODO: this project should have a proper makefile to support out-of-source builds
642643
BUILD_IN_SOURCE 1
643644
CONFIGURE_COMMAND ""
644-
BUILD_COMMAND ${compiler_flags} ${wrapper_command} $(MAKE)
645+
BUILD_COMMAND ${CMAKE_COMMAND} -E env ${compiler_flags} ${wrapper_command} $(MAKE)
645646
-C <SOURCE_DIR>/platform/vita ${pthread_tools} PREFIX=${CMAKE_INSTALL_PREFIX}
646647
INSTALL_COMMAND $(MAKE) -C <SOURCE_DIR>/platform/vita PREFIX=${CMAKE_INSTALL_PREFIX}/${target_arch} install
647648
# Install into the toolchain directory (required for libgomp target)

0 commit comments

Comments
 (0)