[TOOLS]
authorThomas Faber <thomas.faber@reactos.org>
Sun, 5 Feb 2017 09:51:33 +0000 (09:51 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 5 Feb 2017 09:51:33 +0000 (09:51 +0000)
- Add /EHsc for all C++ sources under MSVC instead of doing it per-file

svn path=/trunk/; revision=73696

reactos/sdk/tools/CMakeLists.txt
reactos/sdk/tools/hhpcomp/CMakeLists.txt
reactos/sdk/tools/xml2sdb/CMakeLists.txt

index b54945c..bbcf9e7 100644 (file)
@@ -10,6 +10,7 @@ endfunction()
 
 if(MSVC)
     add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+    add_compile_flags_language("/EHsc" "CXX")
 endif()
 
 add_host_tool(bin2c bin2c.c)
@@ -19,9 +20,6 @@ add_host_tool(mkshelllink mkshelllink/mkshelllink.c)
 add_host_tool(obj2bin obj2bin/obj2bin.c)
 add_host_tool(spec2def spec2def/spec2def.c)
 
-if(MSVC)
-    set_property(SOURCE utf16le/utf16le.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " /EHsc")
-endif()
 add_host_tool(utf16le utf16le/utf16le.cpp)
 
 add_subdirectory(cabman)
index 02e6782..bbe004a 100644 (file)
@@ -12,13 +12,5 @@ list(APPEND SOURCE
 # used by lzx_compress
 add_definitions(-DNONSLIDE)
 
-if(MSVC)
-    set_property(SOURCE
-        hhpcomp.cpp
-        hhp_reader.cpp
-        utils.cpp
-        APPEND_STRING PROPERTY COMPILE_FLAGS " /EHsc")
-endif()
-
 add_executable(hhpcomp ${SOURCE})
 target_link_libraries(hhpcomp)
index 6997c6f..7211864 100644 (file)
@@ -11,8 +11,6 @@ list(APPEND SOURCE
 include_directories(${REACTOS_SOURCE_DIR}/dll/appcompat/apphelp)
 add_host_tool(xml2sdb ${SOURCE})
 
-if(MSVC)
-    set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS " /EHsc")
-else()
+if(NOT MSVC)
     add_target_compile_flags(xml2sdb "-fshort-wchar")
 endif()