From 3a481f93eee036c10b52f1072b7aada4d5b9104e Mon Sep 17 00:00:00 2001 From: Anatoly Baksheev Date: Tue, 20 Jul 2010 11:46:04 +0000 Subject: [PATCH] EHsc- warning fixed --- modules/gpu/CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/gpu/CMakeLists.txt b/modules/gpu/CMakeLists.txt index 20a8b10b39..1240f179af 100644 --- a/modules/gpu/CMakeLists.txt +++ b/modules/gpu/CMakeLists.txt @@ -47,7 +47,14 @@ if (HAVE_CUDA) #string(REPLACE "/W4" "/W3" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") #string(REPLACE "/W4" "/W3" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") #string(REPLACE "/W4" "/W3" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4211 /wd4201 /wd4100 /wd4505 /wd4408 /EHc-") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4211 /wd4201 /wd4100 /wd4505 /wd4408") + + string(REPLACE "/EHsc-" "/EHs" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + string(REPLACE "/EHsc-" "/EHs" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") + string(REPLACE "/EHsc-" "/EHs" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") + string(REPLACE "/EHsc-" "/EHs" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + string(REPLACE "/EHsc-" "/EHs" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") + string(REPLACE "/EHsc-" "/EHs" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") endif() CUDA_COMPILE(cuda_objs ${lib_cuda}) @@ -74,8 +81,7 @@ endif() set_target_properties(${the_target} PROPERTIES VERSION ${OPENCV_VERSION} SOVERSION ${OPENCV_SOVERSION} - OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}" - COMPILE_FLAGS "/EHc-" + OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}" ) # Additional target properties