Skip to content

Revamp FindLibkvm.cmake. #119

Merged
merged 1 commit into from Jul 9, 2013

2 participants

@rakuco
rakuco commented Jul 9, 2013

The most important part of this change is that if fixes the build on the BSDs with CMake >= 2.8.11. From the commit message:

Adapt it to a more modern CMake style:
o XX_FIND_QUIETLY is already set by CMake's FindPackageHandleStandardArgs
o Conditionally looking for libkvm only if the header was found was an
unnecessary optimization that mostly clutters the code without much
benefit.
o LIBKVM_LIBC_HAS_KVM_OPEN was passed to mark_as_advanced() but was never
being set.
o Most importantly, naming a variable LIBKVM_FOUND is just wrong as it is
exactly the variable that is supposed to be set by
FindPackageHandleStandardArgs itself. It simply broke with CMake>=2.8.11.

@rakuco rakuco Revamp FindLibkvm.cmake.
Adapt it to a more modern CMake style:
 o XX_FIND_QUIETLY is already set by CMake's FindPackageHandleStandardArgs
 o Conditionally looking for libkvm only if the header was found was an
   unnecessary optimization that mostly clutters the code without much
   benefit.
 o LIBKVM_LIBC_HAS_KVM_OPEN was passed to mark_as_advanced() but was never
   being set.
 o Most importantly, naming a variable LIBKVM_FOUND is just wrong as it is
   exactly the variable that is supposed to be set by
   FindPackageHandleStandardArgs itself. It simply broke with CMake>=2.8.11.
62e3b3c
@wengxt wengxt merged commit 8e68064 into fcitx:master Jul 9, 2013
@rakuco rakuco deleted the unknown repository branch Jul 9, 2013
@splbio splbio pushed a commit to splbio/freebsd-ports that referenced this pull request Nov 24, 2014
rakuco Add patch fixing the behavior of FindLibkvm.cmake to prepare for CMak…
…e 2.8.11.2.

CMake >= 2.8.11 includes a bug fix [1] that ends up showing a problem with
the current FindLibkvm.cmake that makes the port fail to build.

Apply my upstream fix [2] to make everything work across all CMake versions.

[1] http://public.kitware.com/Bug/view.php?id=13755
[2] fcitx/fcitx#119

Approved by:	portmgr (bapt)


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@322583 35697150-7ecd-e111-bb59-0022644237b5
e0d9dba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.