Re: [CMake] can I use cmake in parallel with Eclipse IDE?

2019-01-26 Thread Bo Zhou
It's not about neither CMake or eclipse, but your target build system. CMake is the build system of build system, the actually work is related to the target building system. If you generated eclipse CDT project + Makefile, of course it might be parallel, there is the option when you create the

Re: [CMake] Get linker flags / include directories for a library target

2018-12-24 Thread Bo Zhou
All the flags/options in the CMake they could be considered as a list. So it's much more easier to handle it as this set(WIN_DEFINITIONS -DNOMINMAX) Remember the list is the object, so we could construct the new list for the specific target. Then to the specific target, just use the 3

Re: [CMake] Odd Behavior in macOS Mojave

2018-11-15 Thread Bo Zhou
At MacOS, in 99% cases, the build task always needs to setup the variables - CMAKE_OSX_TARGET - CMAKE_OSX_DEPLOYMENT_TARGET This 2 variables are important. The CMAKE_OSX_TARGET would define the minimal set of API during compilation, and this affects the built binary. The second is the path

Re: [CMake] Link order (Ubuntu)

2018-11-07 Thread Bo Zhou
Oh, if that's shared libraries, maybe you have to setup the LD_LIBRARY_PATH well for the shared libraries before linking, it just allows the linker to be able to locate the all necessary dynamic libraries during the linking. It happens sometimes on Linux, but not exists on OSX and Windows. On

Re: [CMake] Link order (Ubuntu)

2018-11-05 Thread Bo Zhou
Hi This is the classical issue of GNU toolchain for many years, usually super painful when the program has to be linked with several static libraries. One easy way to solve this issue is that you could specify the same library for multiple times if the manual order really doesn't work well, then

Re: [CMake] Conflicting MSVC manifests

2018-08-21 Thread Bo Zhou
>From my personal experience, I suggest never touch the manifest, because it's not a useful configuration to solve the DLL hell issue since Windows XP. Instead, once we know the exact version of Visual Studio with Update, the distributor just ship the MSVC runtime installer with software, the

Re: [CMake] Using Different Computers for cmake and ctest

2018-08-06 Thread Bo Zhou
Maybe you could improve the CTest system to allow execute remotely, by a shared file system to hold the all built binary files, and do a RPC-like test, and redirect the all output and terminate code from the target GPU machine, it should be able to work. On Wed, Jul 18, 2018 at 10:50 PM Brian S

Re: [CMake] find_library doesn't find .dll on windows

2018-06-12 Thread Bo Zhou
Hi, This is a feature/problem on Windows, the library used for dynamic linking is not the runtime module as Linux or OSX but the .lib, a collection of symbols. I suggest you could still use find_library() to locate the .lib file for linking, then use find_file() to collect the runtime file then

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

Re: [CMake] Can find_package(...) distinguish between debug and release installs?

2018-04-10 Thread Bo Zhou
ich configuration has been installed > and I was hoping that there was a built-in way to distinguish that rather > than me writing some custom scripts for it (where the scripts will search > for the debug/release target files). > > On Mon, Apr 9, 2018 at 11:03 PM Bo Zhou <bo.schwarzst.

Re: [CMake] Can find_package(...) distinguish between debug and release installs?

2018-04-09 Thread Bo Zhou
Hi, Generally speaking, no, you might have to use the suffix or special name to distinguish the different library, such as with the "_d" suffix. The Boost module of CMake is a considerable example, since it could generate different names for Debug and Release libraries on Windows. At

Re: [CMake] How to build CMake so it works on an older Linux?

2018-04-05 Thread Bo Zhou
When use Devtoolset of CentOS, don't forget to install the *binutils* from that devtoolset, or else, the compilation might generate strange error. On Fri, Apr 6, 2018 at 6:13 AM, Alexander Neundorf wrote: > On 2018 M04 5, Thu 15:15:21 CEST Juan E. Sanchez wrote: > > The

Re: [CMake] [FYI] clang-3.4 vs cmake-3.11.0 (How to build CMake so it works on an older Linux?)

2018-04-04 Thread Bo Zhou
> std::hash, std::equal_to<std::basic_string >, > std::allocator<std::pair, > cmGeneratorTarget > *> > >' > this->GeneratorTargetSearchIndex.emplace(gt->GetName(), gt); > ~~~~ ^ > > G X-D > > Regards, >

Re: [CMake] How to build CMake so it works on an older Linux?

2018-04-04 Thread Bo Zhou
The latest CMake requires C++11 compiler, so what you need is just a newer GCC which supports C++11 at your platform, that's it. Usually the ABI is not the problem but the libstdc++, you can use a old Ubuntu with old libstdc++ but build CMake with new compiler and make sure it links with old

Re: [CMake] absolute library path, sorry for the question

2017-12-23 Thread Bo Zhou
https://cmake.org/cmake/help/v3.0/command/find_path.html Please try to pass the NO_CMAKE_SYSTEM_PATH to find_path() and find_library(), but use the HINT to pass the path to thirdparty paths. Of course use the CMAKE_VERBOSE_MAKEFILE to check the log. At the last check the CMakeCache.txt to

Re: [CMake] absolute library path, sorry for the question

2017-12-13 Thread Bo Zhou
Hi CMAKE_SKIP_RPATH usually is used for the shared module which might want to have the customized distributed path such as within the application. According personal experience on POSIX systems (Linux, UNIX, OSX), always enable CMAKE_SKIP_RPATH for the all local shared dependencies, and to the

Re: [CMake] Not able to find boost with cmake

2017-08-03 Thread Bo Zhou
It's better not to use downloaded pre-built libraries, always build by yourself locally. Before using Boost with CMake, please check https://cmake.org/cmake/help/v3.0/module/FindBoost.html If you're trying to use static boost libraries build by MSVC with shared runtime, please make sure the

Re: [CMake] What is the default build type?

2017-08-02 Thread Bo Zhou
It depends on the Generator. To the Makefile, the actual type was controlled by the compiler options. If you don't specific any type, usually it means non-debug and non-optimization because the CMAKE_CXX_FLAGS is empty as default. This is critical, so usually people should specific the actual

Re: [CMake] Boost is planning to switch from bjam to CMake!

2017-07-23 Thread Bo Zhou
Good news ! Hopefully the bcp would also work with CMake so only requires component would be installed. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community.

Re: [CMake] my first experiences

2017-06-09 Thread Bo Zhou
I always compile CMake on Linux but never meet any issues, please make sure you had installed a complete working Linux development environment, with g++, libstdc++-devel etc. The only special thing is just about enabling GUI with Qt, but that's so easy, just install the Qt development libraries

Re: [CMake] Forcing linking compatability to old libc / libstdc++ (Linux)

2017-01-26 Thread Bo Zhou
My personal experience is, always create the distribution on old Linux with older compiler to keep the maximal compatibility. Since usually the GCC will pick libstdc++ from system, so if user runs the distribution on even older Linux, 100% sure the error raises. On CentOS/Redhat we do have the

Re: [CMake] (no subject)

2016-12-19 Thread Bo Zhou
Hi, I'm using ExternalProject_Add to handle this situation with multiple platforms/targets. https://cmake.org/cmake/help/v3.7/module/ExternalProject.html Hope this works for you. On Mon, Dec 19, 2016 at 1:41 AM, Harshal Singhal wrote: > Hello, > > I have a VS2013 project

Re: [CMake] Best Practise for Multiple Platforms of External Project

2016-12-15 Thread Bo Zhou
is functionality, have a look here: > > https://github.com/Crascit/DownloadProject > > > > On Wed, Dec 14, 2016 at 12:29 AM, Bo Zhou <bo.schwarzst...@gmail.com> > wrote: > >> Hi >> >> In my project I have to compile the same external projects by the >&

[CMake] Best Practise for Multiple Platforms of External Project

2016-12-13 Thread Bo Zhou
Hi In my project I have to compile the same external projects by the different generators, is that possible to handle this cases by ExternalProject_Add ? I tried this way, firstly, just download the repository ExternalProject_Add(OPENEXR_DOWNLOAD PREFIX ${OPENEXR_PREFIX} GIT_REPOSITORY

[CMake] Put bin|lib folders under Debug|Release folders

2011-05-07 Thread Bo Zhou
Hello all, I am dealing with a problem about the output path. At present I just do like this, set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib) And in fact the full path will be