diff options
author | José Fonseca <jfonseca@vmware.com> | 2014-04-29 14:32:31 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2014-04-30 10:41:54 +0100 |
commit | 25dcb8506b24988f6ae943a7f08c91fdb8cbc52e (patch) | |
tree | 58aca7fb09ea56345883af548c60eb120367eb06 /CMakeLists.txt | |
parent | 34f2a5d35ec7637e3ad9fcdf35959ce45f3cd254 (diff) |
cmake: Fix stdbool.h for MSVC 2013.
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b051f725..6f45d2ec9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -230,7 +230,13 @@ if (NOT MSVC) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing") ENDIF (CXX_COMPILER_FLAG_WNO_NARROWING) else () - include_directories("include/msvc/c99") + # Use bundled stdbool.h and stdint.h headers for older MSVC versions. + # stdint.h was introduced in MSVC 2010, but stdbool.h was only + # introduced in MSVC 2013. + check_include_file (stdbool.h HAVE_STDBOOL_H) + if (NOT HAVE_STDBOOL_H) + include_directories ("include/msvc/c99") + endif () # -Wall or (/Wall) is actually supported by MSVC and would be detected # by CHECK_C_COMPILER_FLAG above, but is very pedantic, causing |