<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
I think you should be able to do something like the following:<br>
<br>
set(CMAKE_C_FLAGS <PGO_TRAINING_OPTIONS> ${CMAKE_C_FLAGS}) #
For CXX probably as well<br>
ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}" )<br>
ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" )<br>
ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" )<br>
<br>
set(CMAKE_C_FLAGS <PGO_FINAL_OPTIONS> ${CMAKE_C_FLAGS}) # For
CXX probably as well<br>
ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}" )<br>
ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" )<br>
<br>
I haven't tried this out, but I don't see any reason, why this should
not work.<br>
<br>
Regards,<br>
<br>
Martin<br>
<br>
<br>
night owl03d wrote:
<blockquote cite="mid:100688.99231.qm@web52407.mail.re2.yahoo.com"
type="cite">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td
style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;"
valign="top">I am trying to figure out the best way to set up CMake to
do release builds with profile guided optimization for gcc and msvc.<br>
<br>
The general sequence I want to perform is...<br>
<br>
1. Build with instrumentation.<br>
2. Run training apps.<br>
3. rebuild with pgo. (In gcc this is a clobber build, and in msvc it is
just a relink).<br>
<br>
My best guess is that I want to do the build, configure ctest to run my
training apps, and then redo the build. Well 1 and 2 is easy, but I am
trying to figure out how to arrange for 3 to be fired off without
manual intervention. I am sure there is an easy way to do it, but I am
brain farting on it right now.<br>
<br>
I have used scons to do this sort of thing before, but I can't figure
out how to make it work with cmake. <br>
<br>
<br>
<br>
<br>
<br>
</td>
</tr>
</tbody>
</table>
<br>
</blockquote>
<br>
<br>
</body>
</html>