On Wed, Jun 5, 2013 at 7:45 AM, Stephen Kelly <steve...@gmail.com> wrote:
> James Bigler wrote: > > > Things get dicey when you want to pass things like include directories as > > arguments. There are quotes to deal with as well as maximum argument > > length issues. I'm not saying it can't be done, but it needs to be done > > *carefully*. > > Yes. I just pushed a proof-of-concept for doing such necessary > transformations, which we're not doing yet (and which are not really > possible yet): > > https://gitorious.org/~steveire/cmake/steveires-cmake/commit/66376d0 > > Thanks, > > Steve. > > I think you could add more and more complexity, but you won't be satisfied until you can run arbitrary CMake code. Here's an example of transformations I do on host flags. I also do things such as replace -g3 flags with -g for only certain versions of CUDA, since I know which versions -g3 flag is broken on. foreach(flag ${CMAKE_HOST_FLAGS} ${CMAKE_HOST_FLAGS_${build_configuration}}) # Extra quotes are added around each flag to help nvcc parse out flags with spaces. set(nvcc_host_compiler_flags "${nvcc_host_compiler_flags},\"${flag}\"") endforeach() if (nvcc_host_compiler_flags) set(nvcc_host_compiler_flags "-Xcompiler" ${nvcc_host_compiler_flags}) endif()
-- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers