Re: [CMake] static linking on Ubuntu

2018-06-06 Thread Bo Zhou
Hi, You can archive what youwant from the find_library() with NAMES parameter, for example, find_library(THELIB NAMES libthelib.a thelib-static thelib), it would try to pick the static library firstly. Boost. You have to set Boost_USE_STATIC_LIBS before find_package(Boost), so the CMake would try

[CMake] static linking on Ubuntu

2018-06-06 Thread hemant
Hi folks, The P4 programming language has a compiler called p4c with a variant in p4c-xp. This compiler executable is built on Ubuntu 16.04. p4c-xp uses cmake. As one can see, there are several shared libs used by p4c-xp. Each shared lib may call other shared libs. I could use some help w