aboutsummaryrefslogtreecommitdiff
path: root/kde-modules/KDECompilerSettings.cmake
diff options
context:
space:
mode:
authorAlex Merry <kde@randomguy3.me.uk>2014-01-28 17:35:20 +0000
committerAlex Merry <kde@randomguy3.me.uk>2014-01-28 17:35:20 +0000
commit7ca3a6b1e48ed49eb582e1451eb5d7687adb6b37 (patch)
tree3d5e2d1d1ce103a5ae6698cf92f13d948d024284 /kde-modules/KDECompilerSettings.cmake
parentcd1bf67b24b751e176c2d53d0b0f449e2ee07872 (diff)
downloadextra-cmake-modules-7ca3a6b1e48ed49eb582e1451eb5d7687adb6b37.tar.gz
extra-cmake-modules-7ca3a6b1e48ed49eb582e1451eb5d7687adb6b37.tar.bz2
Add a note about why we use C89 instead of C99
Diffstat (limited to 'kde-modules/KDECompilerSettings.cmake')
-rw-r--r--kde-modules/KDECompilerSettings.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake
index ba9b03f1..a4683b04 100644
--- a/kde-modules/KDECompilerSettings.cmake
+++ b/kde-modules/KDECompilerSettings.cmake
@@ -123,6 +123,8 @@ endif()
# Pick sensible versions of the C and C++ standards
# FIXME: MSVC, Intel on windows?
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ # We use the C89 standard because that is what is common to all our
+ # compilers (in particular, MSVC 2010 does not support C99)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=iso9899:1990")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" AND NOT WIN32)