Re: [CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-)
Volker Enderlein wrote: Hi, Thanks, that helps. With there is maybe something to learn from the CMake sources, too. R. > Hello, > > according to https://sourceforge.net/p/predef/wiki/Compilers/ you could > check with > > check_cxx_source_compiles(" > #if defined (_MSC_VER) && (_MSC_VER == 1900) && (_MSC_FULL_VER == > 190024210) > #else >#error compiler is not MSVC Update3 > #endif > int main() { > return 0; > } > " MSVC_UPDATE3_FOUND) > > for the requested feature. > > HTH, Cheers, Volker > > > Am 15/05/2017 um 14:56 schrieb René J.V. Bertin: >> Hello, >> >> A question that will hopefully have a quick/easy answer: >> >> I'd like to detect when the MSVC /fpermissive- (yes, that's a dash at the >> end) can be used instead of /Za . I know that a later update bumped the >> version to 14.0.25422.01 and thus undoubtedly _MSC_FULL_VER== 1402542201 in C >> code so I could assume everyone keeps installs their updates and use that >> value. >> >> But what does this translate to in CMake code (MSVC_VERSION)? Probably not >> just 1903 I presume? >> >> Thanks, >> René > -- 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
Re: [CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-)
Hello, according to https://sourceforge.net/p/predef/wiki/Compilers/ you could check with check_cxx_source_compiles(" #if defined (_MSC_VER) && (_MSC_VER == 1900) && (_MSC_FULL_VER == 190024210) #else #error compiler is not MSVC Update3 #endif int main() { return 0; } " MSVC_UPDATE3_FOUND) for the requested feature. HTH, Cheers, Volker Am 15/05/2017 um 14:56 schrieb René J.V. Bertin: Hello, A question that will hopefully have a quick/easy answer: I'd like to detect when the MSVC /fpermissive- (yes, that's a dash at the end) can be used instead of /Za . I know that a later update bumped the version to 14.0.25422.01 and thus undoubtedly _MSC_FULL_VER== 1402542201 in C code so I could assume everyone keeps installs their updates and use that value. But what does this translate to in CMake code (MSVC_VERSION)? Probably not just 1903 I presume? Thanks, René -- 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
Re: [CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-)
René J.V. Bertin wrote: Bump. No one who can help here? -- 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
Re: [CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-)
On Monday May 15 2017 15:58:53 Konstantin Tokarev wrote: Hello, >Have you tried CHECK_CXX_COMPILER_FLAG? I forgot to mention: I don't have a MS dev set-up at the moment. This is for a cross-platform purposes (in KDE's extra-cmake-modules). Thanks, R -- 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
Re: [CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-)
15.05.2017, 15:57, "René J.V. Bertin": > Hello, > > A question that will hopefully have a quick/easy answer: > > I'd like to detect when the MSVC /fpermissive- (yes, that's a dash at the > end) can be used instead of /Za . I know that a later update bumped the > version to 14.0.25422.01 and thus undoubtedly _MSC_FULL_VER== 1402542201 in C > code so I could assume everyone keeps installs their updates and use that > value. Have you tried CHECK_CXX_COMPILER_FLAG? > > But what does this translate to in CMake code (MSVC_VERSION)? Probably not > just 1903 I presume? > > Thanks, > René > -- > > 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 -- Regards, Konstantin -- 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
[CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-)
Hello, A question that will hopefully have a quick/easy answer: I'd like to detect when the MSVC /fpermissive- (yes, that's a dash at the end) can be used instead of /Za . I know that a later update bumped the version to 14.0.25422.01 and thus undoubtedly _MSC_FULL_VER== 1402542201 in C code so I could assume everyone keeps installs their updates and use that value. But what does this translate to in CMake code (MSVC_VERSION)? Probably not just 1903 I presume? Thanks, René -- 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