# \-isystem fails on centos instead of -I for C++ project

**URL:** <https://discourse.cmake.org/t/isystem-fails-on-centos-instead-of-i-for-c-project/14068>\
**Category:** Code\
**Tags:** os:linux\
**Created:** [May 9, 2025, 1:43pm UTC](https://discourse.cmake.org/t/isystem-fails-on-centos-instead-of-i-for-c-project/14068 "2025-05-09T13:43:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghamu](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/g/53a042/32.png) [@ghamu](https://discourse.cmake.org/u/ghamu)\
**Post date:** [May 9, 2025, 1:43pm UTC](https://discourse.cmake.org/t/isystem-fails-on-centos-instead-of-i-for-c-project/14068/1 "2025-05-09T13:43:04Z")

</div>

hello,  
I have a C++ project that compiles without a problem on Ubuntu 20. The same project won’t compile on a CentOS7, because of “-isystem”. If I replace “-isystem” with “-I” it works. How can I force the use of “-I” instead of “-isystem” only in the case of Centos7?  
Thanks in advance for help,
