The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=15243 ====================================================================== Reported By: Rodrigo Hernandez Assigned To: ====================================================================== Project: CMake Issue ID: 15243 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2014-11-11 14:24 EST Last Modified: 2014-11-11 14:24 EST ====================================================================== Summary: /EHs-c- or /EHs- /EHc- as COMPILE_FLAGS target property does not remove /EHsc from the global CMAKE_CXX_FLAGS Description: Sometimes when adding external projects replacing /EHsc with /EHs-c- to disable exceptions on CMAKE_CXX_FLAGS is not an option because it may break the external project, but when adding /EHs-c- or /EHs- /EHc- to the COMPILE_FLAGS property of the local project, the /EHsc flag remains, causing compiler command line warnings:
cl : Command line warning D9025: overriding '/EHs' with '/EHs-' cl : Command line warning D9025: overriding '/EHc' with '/EHc-' This does not seem to happen when /GR- is set, in that case the global flag from CMAKE_CXX_FLAGS seems to vanish. Steps to Reproduce: add_executable( test test.cpp ) set_target_properties(test PROPERTIES COMPILE_FLAGS "/EHs-c- /D_HAS_EXCEPTIONS=0 /GR-") Additional Information: The provided file contains a minimal project on which the issue is reproduced. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2014-11-11 14:24 Rodrigo HernandezNew Issue 2014-11-11 14:24 Rodrigo HernandezFile Added: NoExceptions.zip ====================================================================== -- 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