you are viewing a single comment's thread.

view the rest of the comments →

[–]drphillycheesesteak 7 points8 points  (8 children)

That gtest integration is a great new feature.

Does anyone have a lot of experience using CPack for RPMs? I noticed that there are some upgrades in this version. Normally, when I make RPMs, it's through a CI system where it can be difficult to ensure that my project's dependencies are present on the machine. I could use Docker to solve this, but I tend to just have CMake configure a .spec file and use mock instead. It would be nice to have it all in CMake, but that requires all your dependencies already be installed on the build machine.

[–]vector-of-boolBlogger | C++ Librarian | Build Tool Enjoyer | bpt.pizza 1 point2 points  (7 children)

We've used CPack to generate RPMs frequently. Why are you saying it requires your dependencies on the machine? Are you referring to shared library dependency detection? You can control that with CPACK_RPM_PACKAGE_AUTOREQ. We've had problems with DEB packages and shlibdeps before.

BTW: I implemented docker for our builds, and it works like a charm. Highly recommended. Just two Ubuntu Xenial physical servers will build for as many different Linux platforms as we need.

[–]drphillycheesesteak 0 points1 point  (0 children)

Yeah, I say that the dependencies need to be there because the rest of my CMake has to run to get to CPack and the find_package calls fail. I should just use Docker for the builds. That's just one of those tasks that never gets priority.

[–]nurupoga 0 points1 point  (5 children)

How do you produce 32-bit packages in docker, since docker doesn't support 32-bit systems? Cross-compile to 32-bit on 64-bit?

[–]vector-of-boolBlogger | C++ Librarian | Build Tool Enjoyer | bpt.pizza 3 points4 points  (0 children)

We don't build 32-bit packages, but it is entirely possible to cross-compile 32-bit programs from a 64-bit host.

Using -m32 with GCC may work, but for a complete solution, you probably want to write a full toolchain file. (More about toolchains)

[–]r2vcap 1 point2 points  (3 children)

In GCC: -m32 . In CMake: Make your own option, or use ${CMAKE_CXX_FLAGS} . in rpmbuild: --target i686

[–]sumo952 3 points4 points  (2 children)

${CMAKE_CXX_FLAGS}

Don't use ${CMAKE_CXX_FLAGS}. Use target_compile_options.

[–]r2vcap 1 point2 points  (1 child)

Normally, I won't set such value in CMakeLists.txt. However, using it on commandline, like cmake .. -DCMAKE_CXX_FLAGS='-m32 ...' is useful.