[PATCH] [libcxxabi] Add a cmake build system.

Dan Albert danalbert at google.com
Tue Jul 1 17:14:51 PDT 2014


samsonov: I used libc++ as an example while setting this up, so some of the structural oddities may have originated there :) I believe the idea is that all the flags that get set up in the root are ones that would be true of anything built in the project (including tests), whereas the flags configured in src/ are specific to libc++abi.(so|a).

================
Comment at: CMakeLists.txt:60
@@ +59,3 @@
+  set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+  set(PACKAGE_BUGREPORT "llvmbugs at cs.uiuc.edu")
+
----------------
Jon Roelofs wrote:
> BUG_REPORT_URL is used elsewhere in the llvm family... will that work here, rather than the hardcoded string?
This block is specifically for out of tree builds, and BUG_REPORT_URL doesn't seem to be specified in the cmake files that get installed (whereas LLVM_PACKAGE_VERSION is).

================
Comment at: src/CMakeLists.txt:57
@@ +56,3 @@
+
+string(REPLACE ";" " " link_flags "${link_flags}")
+
----------------
Alexey Samsonov wrote:
> Do you need to do the same for compile_flags?
I actually have no idea why this is here. I copied most of this from the libc++ cmake files and tuned as necessary.

It's done for the compile flags in the main CMakeLists.txt (applied to LIBCXXABI_CXX_*_FLAGS, as these can contain parts specified from the command line using ; as a delimiter). I don't see anything about the ldflags that would need replacement though... I'll remove it.

http://reviews.llvm.org/D4359






More information about the cfe-commits mailing list