The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15417 ====================================================================== Reported By: Christophe Dumeunier Assigned To: ====================================================================== Project: CMake Issue ID: 15417 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-02-24 10:05 EST Last Modified: 2015-02-24 10:05 EST ====================================================================== Summary: CMAKE_C_COMPILER_VERSION is wrong due to a bug in gcc Description: I suppose CMAKE_C_COMPILER_VERSION and CMAKE_CXX_COMPILER_VERSION are obtained from the maccros __GNUC__, __GNUC_MINOR__ and __GNUC_PATCHLEVEL__. It seems that gcc 4.5.1 has a bug : __GNUC_PATCHLEVEL__ is set to 0 instead of 1. It implies that CMake is wrong when loading the compiler information from gcc 4.5.1. Maybe the version should be checked with the maccro __VERSION__, or obtained directly from the command "gcc --version".
Steps to Reproduce: Simply create a project compiled with gcc 4.5.1 using C or CXX. The bug of gcc can be observed with the following C++ code : #include <iostream> int main(int argc, char** argv) { std::cout << __GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__ << std::endl; return 0; } Additional Information: Note that gcc 4.5.1 is the default compiler on openSUSE 11.4. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-02-24 10:05 Christophe DumeunierNew Issue ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers