Skip to content
Snippets Groups Projects
Commit 30abeeee authored by Bertrand Bellenot's avatar Bertrand Bellenot
Browse files

Another attempt to fix compilation warnings like: Command line warning D9025:...

Another attempt to fix compilation warnings like: Command line warning D9025: overriding '/EHs' with '/EHs-'
parent 77048e1b
Branches
Tags
No related merge requests found
...@@ -54,14 +54,24 @@ add_cling_library(clingInterpreter ...@@ -54,14 +54,24 @@ add_cling_library(clingInterpreter
if(NOT WIN32) if(NOT WIN32)
set_source_files_properties(RuntimeException.cpp COMPILE_FLAGS -fexceptions) set_source_files_properties(RuntimeException.cpp COMPILE_FLAGS -fexceptions)
else() endif()
#set_source_files_properties(RuntimeException.cpp COMPILE_FLAGS " /EHsc ") #set_source_files_properties(RuntimeException.cpp COMPILE_FLAGS " /EHsc ")
# the line above doesn't work, and it gives the following warnings: # the line above doesn't work, and it gives the following warnings:
# cl : Command line warning D9025: overriding '/EHs' with '/EHs-' # cl : Command line warning D9025: overriding '/EHs' with '/EHs-'
# cl : Command line warning D9025: overriding '/EHc' with '/EHc-' # cl : Command line warning D9025: overriding '/EHc' with '/EHc-'
# so let's change the global compiler flags instead: # so let's change the target compiler flags instead:
string(REPLACE "/EHs-c-" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") get_target_property(CI_COMPILE_FLAGS clingInterpreter COMPILE_FLAGS)
if(${CI_COMPILE_FLAGS})
string(REPLACE "/EHs-c-" "" CI_COMPILE_FLAGS ${CI_COMPILE_FLAGS})
# add /EHsc exception handling flag
set(CI_COMPILE_FLAGS "${CI_COMPILE_FLAGS} /EHsc")
else()
set(CI_COMPILE_FLAGS "/EHsc")
endif()
set_target_properties(clingInterpreter PROPERTIES
COMPILE_FLAGS ${CI_COMPILE_FLAGS})
endif() endif()
#add_dependencies(clangDriver ClangAttrList ClangDiagnosticDriver #add_dependencies(clangDriver ClangAttrList ClangDiagnosticDriver
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment