> > I believe CMAKE_CXX_FLAGS is consulted each time an add_library() or > > add_executable() call is processed. So you should be able to remove the > > flag, add the singleton library/executable, and put the flag back. > > > > tyler > > This is the first thing I tried, however it doesn't seem to work. > I seems they are written to the flags.make files at the end, > with whatever the final value of CMAKE_CXX_FLAGS is. > -- > Daniel
Actually, I think it uses whatever the final value of CMAKE_CXX_FLAGS is within the CMakeLists.txt file. Since I was setting the variable back to its original value in the same file with the target, the change was being undone, even though I was setting it back after adding the target. If I just leave the value changed and let the normal scoping rules undo the change, it works perfectly. Now that I think about it, this seems like the same way that include_directories() works. -- Daniel _______________________________________________ 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
