mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 19:29:01 +08:00
65 lines
3.1 KiB
Diff
65 lines
3.1 KiB
Diff
diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake
|
|
index 02ab708..b51bd0b 100644
|
|
--- a/cmake/prebuild.cmake
|
|
+++ b/cmake/prebuild.cmake
|
|
@@ -37,6 +37,10 @@
|
|
|
|
# CPUIDEMU = ../../cpuid/table.o
|
|
|
|
+if (NOT DEFINED BLASHELPER_BINARY_DIR)
|
|
+ set(BLASHELPER_BINARY_DIR "${PROJECT_BINARY_DIR}")
|
|
+endif ()
|
|
+
|
|
if (DEFINED CPUIDEMU)
|
|
set(EXFLAGS "-DCPUIDEMU -DVENDOR=99")
|
|
endif ()
|
|
@@ -87,7 +87,7 @@ file(MAKE_DIRECTORY ${GETARCH_DIR})
|
|
if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
|
|
try_compile(GETARCH_RESULT ${GETARCH_DIR}
|
|
SOURCES ${GETARCH_SRC}
|
|
- COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} -I${PROJECT_SOURCE_DIR}
|
|
+ COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} -I"${PROJECT_SOURCE_DIR}"
|
|
OUTPUT_VARIABLE GETARCH_LOG
|
|
COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH_BIN}
|
|
)
|
|
@@ -95,8 +99,8 @@ endif ()
|
|
message(STATUS "Running getarch")
|
|
|
|
# use the cmake binary w/ the -E param to run a shell command in a cross-platform way
|
|
-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH_BIN} 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT)
|
|
-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH_BIN} 1 OUTPUT_VARIABLE GETARCH_CONF_OUT)
|
|
+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH_BIN} 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT)
|
|
+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH_BIN} 1 OUTPUT_VARIABLE GETARCH_CONF_OUT)
|
|
|
|
message(STATUS "GETARCH results:\n${GETARCH_MAKE_OUT}")
|
|
|
|
@@ -114,7 +114,7 @@ file(MAKE_DIRECTORY ${GETARCH2_DIR})
|
|
if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
|
|
try_compile(GETARCH2_RESULT ${GETARCH2_DIR}
|
|
SOURCES ${PROJECT_SOURCE_DIR}/getarch_2nd.c
|
|
- COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GETARCH2_FLAGS} -I${PROJECT_SOURCE_DIR}
|
|
+ COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GETARCH2_FLAGS} -I"${PROJECT_SOURCE_DIR}"
|
|
OUTPUT_VARIABLE GETARCH2_LOG
|
|
COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH2_BIN}
|
|
)
|
|
@@ -121,8 +125,8 @@ if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
|
|
endif ()
|
|
|
|
# use the cmake binary w/ the -E param to run a shell command in a cross-platform way
|
|
-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT)
|
|
-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT)
|
|
+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT)
|
|
+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT)
|
|
|
|
# append config data from getarch_2nd to the TARGET file and read in CMake vars
|
|
file(APPEND ${TARGET_CONF} ${GETARCH2_CONF_OUT})
|
|
@@ -141,7 +141,7 @@ file(MAKE_DIRECTORY ${GEN_CONFIG_H_DIR})
|
|
if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
|
|
try_compile(GEN_CONFIG_H_RESULT ${GEN_CONFIG_H_DIR}
|
|
SOURCES ${PROJECT_SOURCE_DIR}/gen_config_h.c
|
|
- COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GEN_CONFIG_H_FLAGS} -I${PROJECT_SOURCE_DIR}
|
|
+ COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GEN_CONFIG_H_FLAGS} -I"${PROJECT_SOURCE_DIR}"
|
|
OUTPUT_VARIABLE GEN_CONFIG_H_LOG
|
|
COPY_FILE ${PROJECT_BINARY_DIR}/${GEN_CONFIG_H_BIN}
|
|
)
|