Re: [CMake] CMake misidentifies xlc++ as Clang
Just to roundtrip this for posterity. The fix for incorrect identification of XLC will be in CMake 3.11.0-rc3 On Thu, Mar 8, 2018 at 11:17 AM, Robert Maynard wrote: > Hi. > > 1. You can report this issue on the CMake gitlab ( > https://gitlab.kitware.com/cmake/cmake/issues ). You will want to > attach the result of dumping all defines from the compiler ( xlc++ -dD > -E - < /dev/null or xlc++ -dM -E ). Currently it looks like we are > using '__IBMCPP__' to detect xlc++, and that might not be defined on > the power pc platform. > > 2. If my guess about about 1 is correct, You can try setting the > environment variable CXX_FLAGS to -qxlcompatmacros and see if that > works ( > https://www.ibm.com/support/knowledgecenter/SSXVZZ_13.1.3/com.ibm.xlcpp1313.lelinux.doc/compiler_ref/xlmacros.html#xlmacros__suplink1 > ) > > On Wed, Mar 7, 2018 at 4:22 PM, Thompson, KT wrote: >> Hi, >> >> >> >> I am using cmake-3.9.4 on a power9 system with CXX=xlc++ (IBM XL C++) and >> CMake is misidentifying the compiler as "clang". >> >> >> >> % uname -a >> >> Linux cn2021 4.11.0-44.4.1.el7a.ppc64le #1 SMP Sat Dec 9 02:17:51 EST 2017 >> ppc64le ppc64le ppc64le GNU/Linux >> >> >> >> % echo $CXX >> >> xlc++ >> >> >> >> % $CXX --version >> >> IBM XL C/C++ for Linux, V13.1.6 (Community Edition) >> >> Version: 13.01.0006.0001 >> >> >> >> % cmake .. >> >> -- The CXX compiler identification is Clang 4.0.1 >> >> -- Check for working CXX compiler: >> /projects/opt/ppc64le/ibm/xlc-13.1.6/xlC/13.1.6/bin/xlc++ >> >> -- Check for working CXX compiler: >> /projects/opt/ppc64le/ibm/xlc-13.1.6/xlC/13.1.6/bin/xlc++ -- works >> >> … >> >> >> >> Because, the compiler_ID is misidentified, inappropriate compiler options >> are added when CXX_CXX_STANDARD is set (along with other issues). >> >> >> >> Question 1: How do I report this as a bug? What additional information is >> needed to characterize the failure mode? >> >> >> >> Question 2: Is there a way to force the compiler ID to be "XL" as a >> temporary work around until the bug is fixed? >> >> >> >> Thank you, >> >> >> >> -kt >> >> >> >> >> -- >> >> 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: >> https://cmake.org/mailman/listinfo/cmake >> -- 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: https://cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake misidentifies xlc++ as Clang
Hi. 1. You can report this issue on the CMake gitlab ( https://gitlab.kitware.com/cmake/cmake/issues ). You will want to attach the result of dumping all defines from the compiler ( xlc++ -dD -E - < /dev/null or xlc++ -dM -E ). Currently it looks like we are using '__IBMCPP__' to detect xlc++, and that might not be defined on the power pc platform. 2. If my guess about about 1 is correct, You can try setting the environment variable CXX_FLAGS to -qxlcompatmacros and see if that works ( https://www.ibm.com/support/knowledgecenter/SSXVZZ_13.1.3/com.ibm.xlcpp1313.lelinux.doc/compiler_ref/xlmacros.html#xlmacros__suplink1 ) On Wed, Mar 7, 2018 at 4:22 PM, Thompson, KT wrote: > Hi, > > > > I am using cmake-3.9.4 on a power9 system with CXX=xlc++ (IBM XL C++) and > CMake is misidentifying the compiler as "clang". > > > > % uname -a > > Linux cn2021 4.11.0-44.4.1.el7a.ppc64le #1 SMP Sat Dec 9 02:17:51 EST 2017 > ppc64le ppc64le ppc64le GNU/Linux > > > > % echo $CXX > > xlc++ > > > > % $CXX --version > > IBM XL C/C++ for Linux, V13.1.6 (Community Edition) > > Version: 13.01.0006.0001 > > > > % cmake .. > > -- The CXX compiler identification is Clang 4.0.1 > > -- Check for working CXX compiler: > /projects/opt/ppc64le/ibm/xlc-13.1.6/xlC/13.1.6/bin/xlc++ > > -- Check for working CXX compiler: > /projects/opt/ppc64le/ibm/xlc-13.1.6/xlC/13.1.6/bin/xlc++ -- works > > … > > > > Because, the compiler_ID is misidentified, inappropriate compiler options > are added when CXX_CXX_STANDARD is set (along with other issues). > > > > Question 1: How do I report this as a bug? What additional information is > needed to characterize the failure mode? > > > > Question 2: Is there a way to force the compiler ID to be "XL" as a > temporary work around until the bug is fixed? > > > > Thank you, > > > > -kt > > > > > -- > > 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: > https://cmake.org/mailman/listinfo/cmake > -- 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: https://cmake.org/mailman/listinfo/cmake
[CMake] CMake misidentifies xlc++ as Clang
Hi, I am using cmake-3.9.4 on a power9 system with CXX=xlc++ (IBM XL C++) and CMake is misidentifying the compiler as "clang". % uname -a Linux cn2021 4.11.0-44.4.1.el7a.ppc64le #1 SMP Sat Dec 9 02:17:51 EST 2017 ppc64le ppc64le ppc64le GNU/Linux % echo $CXX xlc++ % $CXX --version IBM XL C/C++ for Linux, V13.1.6 (Community Edition) Version: 13.01.0006.0001 % cmake .. -- The CXX compiler identification is Clang 4.0.1 -- Check for working CXX compiler: /projects/opt/ppc64le/ibm/xlc-13.1.6/xlC/13.1.6/bin/xlc++ -- Check for working CXX compiler: /projects/opt/ppc64le/ibm/xlc-13.1.6/xlC/13.1.6/bin/xlc++ -- works ... Because, the compiler_ID is misidentified, inappropriate compiler options are added when CXX_CXX_STANDARD is set (along with other issues). Question 1: How do I report this as a bug? What additional information is needed to characterize the failure mode? Question 2: Is there a way to force the compiler ID to be "XL" as a temporary work around until the bug is fixed? Thank you, -kt -- 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: https://cmake.org/mailman/listinfo/cmake