From 757fe728c7745dd88c6e876f78934d670d57360f Mon Sep 17 00:00:00 2001 From: Stefan Zellmann Date: Fri, 15 Sep 2017 16:30:32 +0200 Subject: [PATCH] Use -isystem to specify hcc headers --- hcc_config/hcc_config.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hcc_config/hcc_config.cpp b/hcc_config/hcc_config.cpp index 1ec6adaeedc..58a8e007802 100644 --- a/hcc_config/hcc_config.cpp +++ b/hcc_config/hcc_config.cpp @@ -99,7 +99,7 @@ void cxxflags(void) { // using the libc++ for C++ runtime #ifdef USE_LIBCXX // Add include path to the libcxx headers - std::cout << " -I" XSTR(LIBCXX_HEADER) ; + std::cout << " -isystem " XSTR(LIBCXX_HEADER) ; std::cout << " -stdlib=libc++"; #endif @@ -108,13 +108,13 @@ void cxxflags(void) { // clamp if (build_mode) { - std::cout << " -I" CMAKE_BUILD_INC_DIR; + std::cout << " -isystem " CMAKE_BUILD_INC_DIR; } else if (install_mode) { if (const char *p = getenv("HCC_HOME")) { - std::cout << " -I" << p << "/include"; + std::cout << " -isystem " << p << "/include"; } else { - std::cout << " -I" << get_path(path_hcc_include); - std::cout << " -I" << CMAKE_ROCM_ROOT << "/include"; + std::cout << " -isystem " << get_path(path_hcc_include); + std::cout << " -isystem " << CMAKE_ROCM_ROOT << "/include"; } } else { assert(0 && "Unreacheable!"); @@ -122,7 +122,7 @@ void cxxflags(void) { #ifdef CODEXL_ACTIVITY_LOGGER_ENABLED // CodeXL Activity Logger - std::cout << " -I" XSTR(CODEXL_ACTIVITY_LOGGER_HEADER); + std::cout << " -isystem " XSTR(CODEXL_ACTIVITY_LOGGER_HEADER); #endif }