Figuring out to insert new compiling options or changing some options are very hard for a CMake newbie. I'm working on Windows (both Visual Studio, MingW/MSYS) via CMake. In particular, I'd like to do following two things: (1) I'd like to add "-std=c++0x" for some files in lib\Transforms\Instrumentation. (I don't think it's good idea to put this option entirely) (2) I'd like to change intermediate directories for all libraries and tools. (The default is ***.dir) I tried to add some CMake options, but failed. The aboves are easy on Visual Studio. But, chaning CMake (minimally) is hard to do. Thank you, "\0\0" -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110212/6c7b8c07/attachment.html>
On Sat, Feb 12, 2011 at 11:24 PM, nullnull <null.function at gmail.com> wrote:> (1) I'd like to add "-std=c++0x" for some files in > lib\Transforms\Instrumentation. (I don't think it's good idea to put this > option entirely)IIRC this is actually not safe with libstdc++, because enabling C++0x changes some class definitions in ways that break ABI compatibility. In particular, I seem to remember this causing ODR violations. I don't know much about changing the CMake build. Reid
nullnull <null.function at gmail.com> writes:> Figuring out to insert new compiling options or changing some options are > very hard for a CMake newbie. I'm working on Windows (both Visual Studio, > MingW/MSYS) via CMake. In particular, I'd like to do following two things: > > (1) I'd like to add "-std=c++0x" for some files in > lib\Transforms\Instrumentation. (I don't think it's good idea to put this > option entirely) > (2) I'd like to change intermediate directories for all libraries and tools. > (The default is ***.dir) I tried to add some CMake options, but failed. > > The aboves are easy on Visual Studio. But, chaning CMake (minimally) is hard > to do.Those are generic CMake questions, not specifically related to LLVM. The right place for asking those questions is the CMake mailing list. Anyways, the answer to your first question involves set_source_files_properties.