<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>body{font-family:Helvetica,Arial;font-size:13px}</style>
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
There are various variables like CMAKE_C_FLAGS_<CONFIG> that can influence the final flags sent to the compiler. Is there a variable that exists or a function to call to get the final C flags.</div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
<br>
</div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
What I am trying to do is invoke a custom command to run make on an external source tree. This makefile has CC, AR, RANLIB CFLAGS and LDFLAGS variables. The command I would like to do is</div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
<br>
</div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
add_custom_command(<OUTPUT> COMMAND make CC=${CMAKE_C_COMPILER} AR=${CMAKE_AR} RANLIB=${CMAKE_RANLIB} CFLAGS=<what to put here> LDFLAGS=<what to put here> ……)</div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
<br>
</div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
However it doesn’t seem like there is a variable that contains a set of all the flags that cmake would use. For example, when building on OS X the -mmacosx-version-min flag gets tacked on by cmake but I can’t find a variable that contains this flag.</div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
<br>
</div>
<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
Is there a way to do what I want or am I going to have to manage all the C flags manually?</div>
<br>
<div id="bloop_sign_1443552993577127936" class="bloop_sign">
<div style="font-family:helvetica,arial;font-size:13px">-- <br>
Matt Keeler<br>
</div>
</div>
</body>
</html>