Skip to content
Snippets Groups Projects
Commit b0409a8e authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

cmake(Windows): force structured and standard C++ exception model

CMake doesn't add this flag and it must be done manually. This
was not caught early as reconfiguring adds the flag for some
reason. It's to be determined if this is expected behavior. I hope
not, it's just confusing.

+ Add the `/EHsc` flag
+ remove CMAKE_BUILD_TYPE from configure step in helper script
+ remove useless Window definitions from qtwrapper that are defined
  in the parent CMakeLists.txt

Gitlab: #504
Change-Id: I8b03d81cae7ebed6a31cb69642db2f9f09a0c91b
parent aedfd426
Branches
No related tags found
No related merge requests found
......@@ -31,8 +31,7 @@ if(CMAKE_GENERATOR_SHORT MATCHES "Visual Studio ")
set(ENABLE_STATIC true)
add_definitions(-DUNICODE -D_UNICODE)
remove_definitions(-D_MBCS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zi /W0 /MP")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Zi /W0 /MP")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zi /W0 /MP /EHsc")
endif()
if (NOT (CMAKE_CXX_COMPILER_ID MATCHES "MSVC"))
......
......@@ -104,10 +104,9 @@ def build(qtver):
cmake_options = [
'-DCMAKE_PREFIX_PATH=' + qt_dir,
'-DCMAKE_BUILD_TYPE=' + config_str,
'-Dring_BIN=' + daemon_bin,
'-DRING_INCLUDE_DIR=' + daemon_dir + '\\src\\jami'
]
]
if not os.path.exists(build_dir):
os.makedirs(build_dir)
......
......@@ -62,10 +62,4 @@ IF(NOT ${ring_BIN} MATCHES "ring_BIN-NOTFOUND")
Qt::Core
${ring_BIN}
)
ENDIF()
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
add_definitions(-DUNICODE -D_UNICODE)
remove_definitions(-D_MBCS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()
\ No newline at end of file
ENDIF()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment