Calling cmake .. && make install results in such log:
[100%] Built target boost_timer_example
Install the project...
-- Install configuration: ""
Contents of variables:
Variables are not printed out. I have noticed that just after calling cmake .. alone (without make), cmake_install.cmake is created with contents like that:
if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
file(GET_RUNTIME_DEPENDENCIES
RESOLVED_DEPENDENCIES_VAR resolved_deps
UNRESOLVED_DEPENDENCIES_VAR unresolved_deps
EXECUTABLES boost_timer_example just_a_thread
)
MESSAGE("Contents of variables: ")
endif()
Which clearly indicates the variables are substituted for nothing at configuration time.
What am I doing wrong?
You need to escape the $ signs in the install command. Right now, the ${resolved_deps} and ${unresolved_deps} will be expanded at configure time, and hence be empty.
I have a crosscompiler installed (aarch64-linux-gnu) somewhere on the system but i never use it. Why did CMake fill the resolved deps with the crosscompiler’s libs? Isn’t that some bug? My arch is x86_64.
I found 15 minutes to reproduce the issue and ran it on ubuntu and debian machines. On ubuntu every crosscompiler pointed me to aarch64 directory, on debian to x86_64. In every case the paths should point to the one associated with the compiler.
Here’s the example I’m talking about:
Could not reproduce with 18.04 or the debian:latest Docker image. Please open an issue with a Dockerfile (or some other script) with the exact environment needed to reproduce this.