The latest LLVM libc++3.3 of SVN comes with CMakeLists.txt. I am new to CMake, but yesterday I learned enough to be able to create libc++check-outs on the RHEL 6.4 x86_64 host.
In addition, I managed to add enough CPackrelated commands in the specified CMakeLists.txtone to generate a libcxx-3.3.svn-0.el6.x86_64.rpm. But most likely, due to the fact that I am new to CMake, I can not create both a static and a general lib at the same time.
Yes. I reviewed Is it possible to get CMake to create both a static and a general version of the same library? . But instead of using add_libraryand listing all the source files, I would like to use the approach used libc++ CMakeList.txt- using APPEND.
I could create a static lib by replacing ONin line 40 below with OFFto create a static lib
40 option(LIBCXX_ENABLE_SHARED "Build libc++ as a shared library." ON)
41
Or I can leave it as it is and create a shared lib.
I also tackled the following lines, excluding, for example, lines NOTor commenting on lines 232 and 233. But no matter what I tried, I simply could not get the static lib to build with the shared library.
232 if (NOT LIBCXX_ENABLE_SHARED)
233 list(APPEND LIBCXX_CXX_FEATURE_FLAGS -D_LIBCPP_BUILD_STATIC)
234 endif()
How to configure a file CMakeList.txtto be created at the same time?