c++ - Building both static and shared libs for LLVM libc++ 3.3 -
the latest llvm libc++
3.3 svn comes cmakelists.txt
. cmake newbie, yesterday studied enough able build libc++
check-out on rhel 6.4 x86_64 host.
in addition, able add enough cpack
related commands in said cmakelists.txt
generate libcxx-3.3.svn-0.el6.x86_64.rpm
. due being new cmake
, can't build static , shared lib @ same time.
yes. reviewed is possible cmake build both static , shared version of same library?. but, instead of using add_library
, enumerate source files, use approach employed libc++
's cmakelist.txt
- using append
.
i generate static lib replacing on
in line 40 below off
build static lib
40 option(libcxx_enable_shared "build libc++ shared library." on) 41
or leave , build shared lib.
i tinkered following lines, eliminating not
or commenting out lines 232 , 233 example. regardless tried, couldn't seem static lib build shared lib.
232 if (not libcxx_enable_shared) 233 list(append libcxx_cxx_feature_flags -d_libcpp_build_static) 234 endif()
how can adjust cmakelist.txt
file build both @ same time?
ok. decided use "tried , true" method of using add_library
command, *.cpp
listed. works ootb, consider solution.
i re-visit issue again once have time improve proficiency cmake
.
Comments
Post a Comment