This page from the documentation might help: http://www.cmake.org/cmake/help/v3.1/manual/cmake-variables.7.html
One in particular that may be useful for you to test is CMAKE_<LANG>_COMPILER_ID: http://www.cmake.org/cmake/help/v3.1/variable/CMAKE_LANG_COMPILER_ID.html Note that it does state it¹s not guaranteed to be defined, so you¹ll have to experiment. Regards, Parag Chandra Software Engineer, Mobile Team Mobile: +1.919.824.1410 <https://ionic.com> Ionic Security Inc. 1170 Peachtree St. NE STE 2285, Atlanta, GA 30309 On 12/15/14, 11:16 AM, "Petr Bena" <benap...@gmail.com> wrote: >Hi, > >Is it possible to set a compiler flags only if compiler is MinGW (that >means these flags wouldn't be set on MSVC). > >if (WIN32) matches both compilers obviously. Thanks >-- > >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 -- 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