<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri, sans-serif" size="2">
<div>Our normal coding standards requires zero warnings with –wall –wextra (gcc/clang), but often the swig generated file has warnings. We don’t mind turning these warnings off for the generated file, but we still want to see them for other files in the
project. However I’m stumped on how to do this.</div>
<div> </div>
<div>Currently I have</div>
<div> </div>
<div>ADD_DEFINITIONS(-Wno-unused-parameter …)</div>
<div> </div>
<div> which works but it disables the warning for non-generated files as well.</div>
<div> </div>
<div>I understand the right way to do this is by:</div>
<div> </div>
<div>Set_source_files_property(filename PROPERTIES COMPILE_FLAGS “-Wno-unused-parameter …”)</div>
<div> </div>
<div>However I don’t have filename. Instead I have myInputfile.i, which gets turns into something like myInputFilePYTHON_wrap.cxx. Of course I can generate this name, but that seems fragile: if cmake desides to change the file mangling in the future I need
to change my algorithm. </div>
<div> </div>
<div>So the question is either: is there are good way to get the generated filename, or is there a different way I should be doing this?</div>
<div> </div>
<div> </div>
</font>
</body>
</html>