summaryrefslogtreecommitdiff
path: root/src/utilcode/CMakeLists.txt
diff options
context:
space:
mode:
authorMike Danes <onemihaid@hotmail.com>2015-12-12 15:12:10 +0200
committerMike Danes <onemihaid@hotmail.com>2015-12-13 00:06:09 +0200
commitd9604b22438b263077e180156160456418935a42 (patch)
tree26939517913d7f005d8d44aa2a368e6dd595aba7 /src/utilcode/CMakeLists.txt
parentade2cc7a51171c0ba264ecd72c7351d8bbda457f (diff)
downloadcoreclr-d9604b22438b263077e180156160456418935a42.tar.gz
coreclr-d9604b22438b263077e180156160456418935a42.tar.bz2
coreclr-d9604b22438b263077e180156160456418935a42.zip
Remove unnecessary files from build and disable LNK4221
Some files have their contents ifdefed out because some CLR features (remoting, CAS, fusion etc.) are not present (and they'll probably never be) in CoreCLR. A few others are DAC, CrossGen or arch specific so they have been moved to the appropiate file lists.
Diffstat (limited to 'src/utilcode/CMakeLists.txt')
-rw-r--r--src/utilcode/CMakeLists.txt47
1 files changed, 38 insertions, 9 deletions
diff --git a/src/utilcode/CMakeLists.txt b/src/utilcode/CMakeLists.txt
index 52a017fd21..e452da8825 100644
--- a/src/utilcode/CMakeLists.txt
+++ b/src/utilcode/CMakeLists.txt
@@ -5,7 +5,7 @@ if(WIN32)
add_compile_options(/wd4996)
endif(WIN32)
-set(UTILCODE_SOURCES
+set(UTILCODE_COMMON_SOURCES
clrhost_nodependencies.cpp
ccomprc.cpp
ex.cpp
@@ -16,16 +16,13 @@ set(UTILCODE_SOURCES
makepath.cpp
splitpath.cpp
clrconfig.cpp
- registrywrapper.cpp
collections.cpp
- genericstackprobe.cpp
posterror.cpp
fstream.cpp
clrhelpers.cpp
stgpool.cpp
stgpooli.cpp
stgpoolreadonly.cpp
- lazycow.cpp
utsem.cpp
peinformation.cpp
check.cpp
@@ -38,10 +35,8 @@ set(UTILCODE_SOURCES
guidfromname.cpp
jitperf.cpp
memorypool.cpp
- rangetree.cpp
iallocator.cpp
loaderheap.cpp
- perflog.cpp
outstring.cpp
ilformatter.cpp
opinfo.cpp
@@ -71,20 +66,55 @@ set(UTILCODE_SOURCES
# They should be moved out from here into the declaration
# of UTILCODE_SOURCES above after fixing compiler errors.
if(WIN32)
- list(APPEND UTILCODE_SOURCES
+ list(APPEND UTILCODE_COMMON_SOURCES
appxutil.cpp
dlwrap.cpp
downlevel.cpp
loadrc.cpp
newapis.cpp
- tls.cpp
securitywrapper.cpp
securityutil.cpp
stacktrace.cpp
)
+
+ if(CLR_CMAKE_PLATFORM_ARCH_I386 OR CLR_CMAKE_PLATFORM_ARCH_ARM)
+ list(APPEND UTILCODE_COMMON_SOURCES
+ lazycow.cpp
+ )
+ endif()
endif(WIN32)
+set(UTILCODE_SOURCES
+ ${UTILCODE_COMMON_SOURCES}
+ perflog.cpp
+)
+
+if(WIN32)
+ list(APPEND UTILCODE_SOURCES
+ tls.cpp
+ )
+endif()
+
+set(UTILCODE_DAC_SOURCES
+ ${UTILCODE_COMMON_SOURCES}
+ hostimpl.cpp
+)
+
+set(UTILCODE_CROSSGEN_SOURCES
+ ${UTILCODE_COMMON_SOURCES}
+ hostimpl.cpp
+ perflog.cpp
+)
+
+set(UTILCODE_STATICNOHOST_SOURCES
+ ${UTILCODE_COMMON_SOURCES}
+ hostimpl.cpp
+)
+
convert_to_absolute_path(UTILCODE_SOURCES ${UTILCODE_SOURCES})
+convert_to_absolute_path(UTILCODE_DAC_SOURCES ${UTILCODE_DAC_SOURCES})
+convert_to_absolute_path(UTILCODE_CROSSGEN_SOURCES ${UTILCODE_CROSSGEN_SOURCES})
+convert_to_absolute_path(UTILCODE_STATICNOHOST_SOURCES ${UTILCODE_STATICNOHOST_SOURCES})
if(CLR_CMAKE_PLATFORM_UNIX)
add_compile_options(-fPIC)
@@ -94,4 +124,3 @@ add_subdirectory(dac)
add_subdirectory(dyncrt)
add_subdirectory(staticnohost)
add_subdirectory(crossgen)
-