Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 4e6e28d

Browse files
Do not include local directory if cross compiling
[ 0%] Building CXX object src/pal/src/eventprovider/tracepointprovider/CMakeFiles/coreclrtraceptprovider.dir/__/lttng/traceptprovdotnetruntime.cpp.o cc1plus: error: include location "/usr/local/include" is unsafe for cross-compilation [-Werror=poison-system-directories]
1 parent b735129 commit 4e6e28d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pal/src/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL Darwin OR CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
55
set(CLR_CMAKE_USE_SYSTEM_LIBUNWIND 1)
66
endif(CMAKE_SYSTEM_NAME STREQUAL Darwin OR CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
77

8-
include_directories(SYSTEM /usr/local/include)
8+
if(NOT DEFINED ENV{ROOTFS_DIR})
9+
include_directories(SYSTEM /usr/local/include)
10+
endif()
911

1012
add_compile_options(-fPIC)
1113

0 commit comments

Comments
 (0)