D5218: explicitly set NO_CMAKE_FIND_ROOT_PATH

2017-03-29 Thread Harald Sitter
This revision was automatically updated to reflect the committed changes.
Closed by commit R237:4468076a41f9: explicitly set NO_CMAKE_FIND_ROOT_PATH 
(authored by sitter).

REPOSITORY
  R237 KConfig

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D5218?vs=12914=12976

REVISION DETAIL
  https://phabricator.kde.org/D5218

AFFECTED FILES
  KF5ConfigConfig.cmake.in

To: sitter, mdawson, apol
Cc: #frameworks


D5218: explicitly set NO_CMAKE_FIND_ROOT_PATH

2017-03-28 Thread Aleix Pol Gonzalez
apol accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R237 KConfig

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D5218

To: sitter, mdawson, apol
Cc: #frameworks


D5218: explicitly set NO_CMAKE_FIND_ROOT_PATH

2017-03-28 Thread Harald Sitter
sitter created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.

REVISION SUMMARY
  When using a toolchain file one often would want to set a
  CMAKE_FIND_ROOT_PATH to "re-root" lookups into a staging area to prevent
  native host artifcats from being found. This in particular is usually the
  case for lib/include/package finders as one would want the target
  systems build artifacts rather than the hosts.
  find_file() unfortunately draws its re-rooting rule from
  CMAKE_FIND_ROOT_PATH_MODE_INCLUDE, which as mentioned would usually be
  set not to look in the actual host paths to avoid picking up wrong includes
  which would also prevent find_file to work here.
  
  In the case of the coreaddonstooling it makes sense to look in the host
  though. For one the lookup only runs when CROSS_COMPILING is set (which
  usually is the case for toolchains), AND one explicitly has to specify a
  HOST_TOOLING path. So in a way by specifying that one is already opting
  out of whatever rooting rules one has set elsewhere as setting that var
  is a clear indication that we have *specific* host tooling and we want
  to use that rather than anything else.
  As a result NO_CMAKE_FIND_ROOT_PATH is the way to go when looking for stuff
  under a KF5_HOST_TOOLING conditional.

REPOSITORY
  R237 KConfig

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D5218

AFFECTED FILES
  KF5ConfigConfig.cmake.in

To: sitter, mdawson, apol
Cc: #frameworks