summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2017-04-13 05:17:19 (GMT)
committerJiyoung Yun <jy910.yun@samsung.com>2017-04-13 05:17:19 (GMT)
commita56e30c8d33048216567753d9d3fefc2152af8ac (patch)
tree7e5d979695fc4a431740982eb1cfecc2898b23a5 /CMakeLists.txt
parent4b11dc566a5bbfa1378d6266525c281b028abcc8 (diff)
downloadcoreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.zip
coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.tar.gz
coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.tar.bz2
Imported Upstream version 2.0.0.11353upstream/2.0.0.11353
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt33
1 files changed, 15 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c9a75e5..4aad5a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,9 @@ project(CoreCLR)
# Include cmake functions
include(functions.cmake)
+# Include global configure settings
+include(configure.cmake)
+
if (WIN32)
message(STATUS "VS_PLATFORM_TOOLSET is ${CMAKE_VS_PLATFORM_TOOLSET}")
message(STATUS "VS_PLATFORM_NAME is ${CMAKE_VS_PLATFORM_NAME}")
@@ -101,9 +104,9 @@ else (WIN32)
else (CMAKE_SYSTEM_NAME STREQUAL Darwin)
# Ensure that objcopy is present
- if (DEFINED ENV{CROSSCOMPILE} AND NOT DEFINED CLR_CROSS_COMPONENTS_BUILD)
- if (CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l OR CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
- find_program(OBJCOPY ${TOOLCHAIN_PREFIX}objcopy)
+ if (CLR_UNIX_CROSS_BUILD AND NOT DEFINED CLR_CROSS_COMPONENTS_BUILD)
+ if (CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l OR CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL arm)
+ find_program(OBJCOPY ${TOOLCHAIN}-objcopy)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL i686)
find_program(OBJCOPY objcopy)
else()
@@ -149,6 +152,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux)
set(CLR_CMAKE_PLATFORM_UNIX_AMD64 1)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l)
set(CLR_CMAKE_PLATFORM_UNIX_ARM 1)
+ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL arm)
+ set(CLR_CMAKE_PLATFORM_UNIX_ARM 1)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
set(CLR_CMAKE_PLATFORM_UNIX_ARM64 1)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL i686)
@@ -159,15 +164,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux)
endif()
set(CLR_CMAKE_PLATFORM_LINUX 1)
- # Detect Alpine Linux
- SET(OS_RELEASE_FILENAME "/etc/os-release")
- if (EXISTS ${OS_RELEASE_FILENAME})
- file(READ ${OS_RELEASE_FILENAME} OS_RELEASE)
- string(FIND "${OS_RELEASE}" "ID=alpine" CLR_CMAKE_PLATFORM_ALPINE_LINUX)
- if(CLR_CMAKE_PLATFORM_ALPINE_LINUX EQUAL -1)
- unset(CLR_CMAKE_PLATFORM_ALPINE_LINUX)
- endif(CLR_CMAKE_PLATFORM_ALPINE_LINUX EQUAL -1)
- endif(EXISTS ${OS_RELEASE_FILENAME})
+ # Detect Linux ID
+ if(DEFINED CLR_CMAKE_LINUX_ID)
+ if(CLR_CMAKE_LINUX_ID STREQUAL alpine)
+ set(CLR_CMAKE_PLATFORM_ALPINE_LINUX 1)
+ endif()
+ endif(DEFINED CLR_CMAKE_LINUX_ID)
endif(CMAKE_SYSTEM_NAME STREQUAL Linux)
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
@@ -292,7 +294,6 @@ set(CMAKE_CXX_FLAGS_CHECKED ${CLR_CXX_FLAGS_CHECKED_INIT} CACHE STRING "Flags us
set(CMAKE_EXE_LINKER_FLAGS_CHECKED "")
set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "")
-# Disable the following line for UNIX altjit on Windows
set(CMAKE_CXX_STANDARD_LIBRARIES "") # do not link against standard win32 libs i.e. kernel32, uuid, user32, etc.
if (WIN32)
@@ -313,7 +314,6 @@ if (WIN32)
# Linker flags
#
- # Disable the following line for UNIX altjit on Windows
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /MANIFEST:NO") #Do not create Side-by-Side Assembly Manifest
if (CLR_CMAKE_PLATFORM_ARCH_ARM)
@@ -519,9 +519,6 @@ else ()
clr_unknown_arch()
endif ()
-# Enable for UNIX altjit on Windows - set(CLR_CMAKE_PLATFORM_UNIX_AMD64 1)
-# Enable for UNIX altjit on Windows - add_definitions(-DCLR_CMAKE_PLATFORM_UNIX=1)
-
#--------------------------------------
# Compile Options
#--------------------------------------
@@ -545,7 +542,7 @@ include(pgosupport.cmake)
# - do not depend on clr's compile definitions
#-----------------------------------------
if(CLR_CMAKE_PLATFORM_UNIX AND NOT DEFINED CLR_CROSS_COMPONENTS_BUILD)
- add_subdirectory(src/corefx)
+ add_subdirectory(src/corefx)
endif()
if(CLR_CMAKE_PLATFORM_UNIX)