Hi,
I think you should be able to do something like the following:
set(CMAKE_C_FLAGS <PGO_TRAINING_OPTIONS> ${CMAKE_C_FLAGS}) # For CXX
probably as well
ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}" )
ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" )
ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" )
set(CMAKE_C_FLAGS <PGO_FINAL_OPTIONS> ${CMAKE_C_FLAGS}) # For CXX
probably as well
ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}" )
ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" )
I haven't tried this out, but I don't see any reason, why this should
not work.
Regards,
Martin
night owl03d wrote:
> 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.
>
> The general sequence I want to perform is...
>
> 1. Build with instrumentation.
> 2. Run training apps.
> 3. rebuild with pgo. (In gcc this is a clobber build, and in msvc it
> is just a relink).
>
> 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.
>
> I have used scons to do this sort of thing before, but I can't figure
> out how to make it work with cmake.
>
>
>
>
>
>
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake