# Include cmake functions
include(functions.cmake)
-message(STATUS "CMAKE_VS_PLATFORM_TOOLSET is ${CMAKE_VS_PLATFORM_TOOLSET}")
-message(STATUS "CMAKE_VS_PLATFORM_NAME is ${CMAKE_VS_PLATFORM_NAME}")
-message(STATUS "CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION is ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
+if (WIN32)
+ message(STATUS "VS_PLATFORM_TOOLSET is ${CMAKE_VS_PLATFORM_TOOLSET}")
+ message(STATUS "VS_PLATFORM_NAME is ${CMAKE_VS_PLATFORM_NAME}")
+ message(STATUS "VS_WINDOWS_TARGET_PLATFORM_VERSION is ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
+endif (WIN32)
# Set commonly used directory names
set(CLR_DIR ${CMAKE_CURRENT_SOURCE_DIR})
elseif(CLR_CMAKE_PLATFORM_ARCH_ARM)
# On Arm32 for Windows, use C++ compiler to process the .asm since it includes C-style headers.
- set(DBGHELPERS_ASM $ENV{__IntermediatesDir}/dbghelpers.asm)
+ set(DBGHELPERS_ASM ${CMAKE_CURRENT_BINARY_DIR}/dbghelpers.asm)
set(ASM_OPTIONS " -g ")
preprocess_def_file(${ASM_FILE} ${DBGHELPERS_ASM})
# Inserts a custom command in CMake build to preprocess each asm source file
get_filename_component(name ${ASM_FILE} NAME_WE)
- file(TO_CMAKE_PATH "$ENV{__IntermediatesDir}/${name}.asm" ASM_PREPROCESSED_FILE)
+ file(TO_CMAKE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${name}.asm" ASM_PREPROCESSED_FILE)
preprocess_def_file(${ASM_FILE} ${ASM_PREPROCESSED_FILE})
# On Arm32, compile the preprocessed binary to .obj
# Generate the batch file that will invoke the assembler
file(TO_CMAKE_PATH "${CMAKE_CURRENT_BINARY_DIR}/runasm_${name}_${CMAKE_BUILD_TYPE}.cmd" ASM_SCRIPT_FILE)
- # ARM32TODO: Set asm options global so that all invocations can use it.
file(GENERATE OUTPUT "${ASM_SCRIPT_FILE}"
CONTENT "\"${CMAKE_ASM_MASM_COMPILER}\" -g ${ASM_INCLUDE_DIRECTORIES} ${ASM_DEFINITIONS} ${ASM_CMDLINE}")