Bug 318650 - Unknown CMake command "check_function_exists"
Summary: Unknown CMake command "check_function_exists"
Status: RESOLVED NOT A BUG
Alias: None
Product: kde-windows
Classification: Miscellaneous
Component: buildsystem (show other bugs)
Version: unspecified
Platform: Compiled Sources All
: NOR normal
Target Milestone: ---
Assignee: Jarosław Staniek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-21 00:08 UTC by Chris
Modified: 2016-07-18 20:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris 2013-04-21 00:08:49 UTC
CMake Error at kioslave/fish/CMakeLists.txt:6 (check_function_exists):
  Unknown CMake command "check_function_exists".


-- Configuring incomplete, errors occurred!
emerge fatal error: while running configure cmd: cmake -G "MinGW Makefiles"  -DCMAKE_INSTALL_PREFIX="G:/kderoot" -DCMAKE
_INCLUDE_PATH="G:/kderoot/include" -DCMAKE_LIBRARY_PATH="G:/kderoot/lib" -DCMAKE_PREFIX_PATH="G:/kderoot" -DCMAKE_BUILD_
TYPE=RelWithDebInfo "G:\kderoot\git\kde-runtime"
emerge fatal error: running python G:\kderoot\emerge\portage\kde\kde-runtime\kde-runtime-20110130.py compile
emerge debug: Task: compile for kde-runtime stopped after: 0:00:29.937500
emerge debug: Task: Emerge stopped after: 0:00:45.828125


Adding 
include(CheckFunctionExists)

to kioslave\fish\CMakeLists.txt seems to resolve this

Reproducible: Always

Steps to Reproduce:
emerge kde-runtime
Actual Results:  
error listed above

Expected Results:  
compile
Comment 1 Juan José Morales 2016-07-18 19:42:59 UTC
I have the same problem when try to compile Kexi in Ubuntu.
Im using this:

 cmake -DCMAKE_INSTALL_PREFIX=$HOME/kde/inst5 $HOME/kexi/src/       -DCMAKE_BUILD_TYPE=RelWithDebInfo -Wno-dev


and I get this:

CMake Error at CMakeLists.txt:5 (check_function_exists):
  Unknown CMake command "check_function_exists".


-- Configuring incomplete, errors occurred!
Comment 2 Jarosław Staniek 2016-07-18 20:09:14 UTC
@Juan

What is the  $HOME/kexi/src/ dir?

I guess you're not pointing to the root dir of kexi.git's sources but to kexi.git/src/. This will never work.

I see you might understood  '/src'  subdir of kexi as the source dir but it's not. Source code also exists in the / dir of the git tree.


The same answer goes the original author, Chris:  kioslave/fish is a subdir, don't build subdirs :)
Comment 3 Jarosław Staniek 2016-07-18 20:11:48 UTC
@Juan 
Assuming you have executed:

cd $HOME/kde/src
git clone kde:kexi

and based on https://community.kde.org/Calligra/Building/3#Build_Calligra, you need:

cd $HOME/kde/build/kexi

cmake -DCMAKE_INSTALL_PREFIX=$HOME/kde/inst5 $HOME/kde/src/kexi -DCMAKE_BUILD_TYPE=RelWithDebInfo

Of course this won't end with success if you miss dependencies, and I guess you do so far :)
Comment 4 Juan José Morales 2016-07-18 20:26:55 UTC
You are  right. And It worked for me . Apologize for my misunderstanding.