Set OSX Clang to case sensitivity to include operators

I know that case sensitivity in C ++ include statements is a filesystem issue (related questions here and here ).

Is it possible for Clang to require case sensitive matches to prevent cross-platform build issues?

+4


source to share


2 answers


Ok, as you stated and as these questions have pointed out, this is a filesystem issue. If you've formatted your OS X drive as case sensitive then it might work, but in reality you should probably find another way to separate the headers.



+2


source


Clang now has the following warning flags:

-Wnonportable-include-path
-Wnonportable-system-include-path

      

The first is for the specified inclusions, and the second is for the angle brackets. They can even be mapped to errors:



-Werror=nonportable-include-path
-Werror=nonportable-system-include-path

      

Presumably they are not enabled by default because they can slow down compilation. I didn't take the time to figure out how much.

0


source







All Articles