osx - CMake warnings under OS X: MACOSX_RPATH is not specified for the following targets -


i try build cmake-based software under os x (yosemite) can built under fedora 21. uses bunch of libraries. both, big open ones boost , self-written ones lying in /installation_folder/lib. use cmake version 3.3.0.

after executing

mkdir build cd build cmake .. -dcmake_c_compiler=/usr/local/cellar/gcc/5.2.0/bin/gcc-5 -dcmake_cxx_compiler=/usr/local/cellar/gcc/5.2.0/bin/g++-5  -dcmake_module_path=${pwd}/../external/install/share/llvm/cmake  

i following warnings:

cmake warning (dev): policy cmp0042 not set: macosx_rpath enabled default.  run "cmake --help-policy cmp0042" policy details.  use cmake_policy command set policy , suppress warning.  macosx_rpath not specified following targets:  clangwrapper structure wcetxml  warning project developers.  use -wno-dev suppress it. 

the cmakelists.txt contains following lines regarding rpath:

set(cmake_skip_build_rpath false) set(cmake_install_rpath "${cmake_install_prefix}/lib") set(cmake_install_rpath_use_link_path true)  list(find cmake_platform_implicit_link_directories "${cmake_install_prefix}/lib" issystemdir)  if("${issystemdir}" strequal "-1")   set(cmake_install_rpath "${cmake_install_prefix}/lib") endif("${issystemdir}" strequal "-1") 

all can ${cmake_install_prefix}/lib indeed correct path, , other libraries boost found correctly.

ignoring warnings , continuing "make" in build directory results in linking error.

i read cmake wiki rpath handling article, still not able distinguish between these path variables , correct use on os x.

adding set(cmake_macosx_rpath 1) cmakelists.txt, before above written statements, lets warnings disappear. linking problem after executing make stays. brings me assumption rpath setup has nothing linking problem.

nevertheless, thread's problem solved. explanation correct use of rpath options inside cmakelists.txt still welcome!


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -