-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
CMakeLists.txt
55 lines (44 loc) · 1.88 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
include_directories(../inc)
include_directories(../../pal/inc)
include_directories(${EP_GENERATED_HEADER_PATH})
add_definitions(-DPAL_STDCPP_COMPAT)
set(SHARED_EVENTPIPE_SOURCE_PATH ${CLR_SRC_NATIVE_DIR}/eventpipe)
add_definitions(-DFEATURE_CORECLR)
add_definitions(-DFEATURE_PERFTRACING)
add_definitions(-DFEATURE_PERFTRACING_STANDALONE_PAL)
if(CLR_CMAKE_HOST_WIN32)
add_definitions(-DWIN32_LEAN_AND_MEAN)
include_directories(../../inc) #needed for warning control
if(CLR_CMAKE_TARGET_WIN32)
set (EVENTPIPE_PAL_SOURCES "${SHARED_EVENTPIPE_SOURCE_PATH}/ds-ipc-pal-namedpipe.c")
set_source_files_properties(${EVENTPIPE_PAL_SOURCES} PROPERTIES LANGUAGE CXX)
set(TWO_WAY_PIPE_SOURCES
${EVENTPIPE_PAL_SOURCES}
win/twowaypipe.cpp
win/processdescriptor.cpp
)
else(CLR_CMAKE_TARGET_WIN32)
set(TWO_WAY_PIPE_SOURCES
dummy/twowaypipe.cpp
)
endif(CLR_CMAKE_TARGET_WIN32)
endif(CLR_CMAKE_HOST_WIN32)
if(CLR_CMAKE_HOST_UNIX)
add_definitions(-DPAL_IMPLEMENTATION)
add_definitions(-D_POSIX_C_SOURCE=200809L)
set (EVENTPIPE_PAL_SOURCES "${SHARED_EVENTPIPE_SOURCE_PATH}/ds-ipc-pal-socket.c")
set_source_files_properties(${EVENTPIPE_PAL_SOURCES} PROPERTIES LANGUAGE CXX)
if (CMAKE_VERSION VERSION_GREATER 3.11 OR CMAKE_VERSION VERSION_EQUAL 3.11)
set_source_files_properties(${EVENTPIPE_PAL_SOURCES} PROPERTIES COMPILE_OPTIONS -xc++)
else(CMAKE_VERSION VERSION_GREATER 3.11 OR CMAKE_VERSION VERSION_EQUAL 3.11)
add_compile_options(-xc++)
endif()
set(TWO_WAY_PIPE_SOURCES
${EVENTPIPE_PAL_SOURCES}
unix/twowaypipe.cpp
unix/processdescriptor.cpp
)
endif(CLR_CMAKE_HOST_UNIX)
add_library_clr(debug-pal_obj OBJECT ${TWO_WAY_PIPE_SOURCES})
add_library(debug-pal INTERFACE)
target_sources(debug-pal INTERFACE $<TARGET_OBJECTS:debug-pal_obj>)