diff options
author | Rama Krishnan Raghupathy <ramarag@microsoft.com> | 2016-03-08 18:26:13 -0800 |
---|---|---|
committer | Rama Krishnan Raghupathy <ramarag@microsoft.com> | 2016-03-09 14:27:22 -0800 |
commit | b8f570dc3028cab153fb6a007ba8d24abb4e1fd3 (patch) | |
tree | b1dd1ed93d3d512ea0dd902f31da9cd7ee78443e /tests/CMakeLists.txt | |
parent | d2ab1fbd40343e01fcb71fb9793ee7c681eeb1de (diff) | |
download | coreclr-b8f570dc3028cab153fb6a007ba8d24abb4e1fd3.tar.gz coreclr-b8f570dc3028cab153fb6a007ba8d24abb4e1fd3.tar.bz2 coreclr-b8f570dc3028cab153fb6a007ba8d24abb4e1fd3.zip |
Enable native test binaries to be built for Arm64
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 119266c2f4..813d97342c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -12,6 +12,23 @@ set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "") set(INC_PLATFORM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/Common/Platform) if (WIN32) add_definitions(-DWINDOWS=1) + + if (DEFINED ENV{__ToolsetDir}) + # Hack for private Tool Set + # CMAKE_CXX_COMPILER will default to the compiler installed with + # Visual studio. Overwrite it to the compiler on the path. + + find_program(PATH_CXX_COMPILER cl) + set(CMAKE_CXX_COMPILER ${PATH_CXX_COMPILER}) + + message("Overwriting the CMAKE_CXX_COMPILER.") + message("CMAKE_CXX_COMPILER found:${CMAKE_CXX_COMPILER}") + + # Temporary until cmake has VS generators for hacky toolsets [arm64] + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /machine:${CLR_CMAKE_TARGET_ARCH}") + set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /machine:${CLR_CMAKE_TARGET_ARCH}") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /machine:${CLR_CMAKE_TARGET_ARCH}") + endif() endif() # Compile options |