diff options
author | Brad King <brad.king@kitware.com> | 2009-02-25 16:44:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-02-25 16:44:46 (GMT) |
commit | cb788e8f6dfeeb5a934679f671adc87116837834 (patch) | |
tree | ed5632df00a4633e58b95538345cac730db49f1b /Modules/Platform | |
parent | 261600bd090d1946c7c4fed80660b2ace216ddf8 (diff) | |
download | CMake-cb788e8f6dfeeb5a934679f671adc87116837834.zip CMake-cb788e8f6dfeeb5a934679f671adc87116837834.tar.gz CMake-cb788e8f6dfeeb5a934679f671adc87116837834.tar.bz2 |
ENH: Re-enable system include dir suppression
This creates variable CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES to
specify implicit include directories on a per-language basis. This
replaces the previous platform-wide variable. It is necessary to
avoid explicit specification of -I/usr/include on some compilers
(such as HP aCC) because:
1.) It may break ordering among system include directories defined
internally by the compiler, thus getting wrong system headers.
2.) It tells the compiler to treat the system include directory
as a user include directory, enabling warnings in the headers.
See issue #8598.
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/UnixPaths.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake index 7ed85c0..584d334 100644 --- a/Modules/Platform/UnixPaths.cmake +++ b/Modules/Platform/UnixPaths.cmake @@ -53,5 +53,12 @@ LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES /lib /usr/lib /usr/lib32 /usr/lib64 ) +LIST(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES + /usr/include + ) +LIST(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES + /usr/include + ) + # Enable use of lib64 search path variants by default. SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) |