CMake Error at CMakeLists.txt:32 (generate_export_header): Unknown CMake command "generate_export_header".

1,727 views
Skip to first unread message

Philippe Nimmegeers

unread,
Apr 9, 2015, 9:02:37 AM4/9/15
to casadi...@googlegroups.com
While trying to compile casADi 2.0.0 (Ubuntu 12.0.4), following error occurs:

CMake Error at CMakeLists.txt:32 (generate_export_header):
  Unknown CMake command "generate_export_header".

Can someone please help or have an idea why this error is occurring?

Joris Gillis

unread,
Apr 9, 2015, 9:05:17 AM4/9/15
to casadi...@googlegroups.com
Hello Philippe,

Could you give it a try with the patched version (2.0.2) and report back to us?

Best regards,
    Joris Gillis

Philippe Nimmegeers

unread,
Apr 9, 2015, 9:25:17 AM4/9/15
to casadi...@googlegroups.com
Hello Joris,

I gave it a try, but I still get the same error...
Here is a summary of the steps I've done:

git clone https://github.com/casadi/casadi.git casadi && cd casadi && git checkout 2.0.2

cd casadi
mkdir build
cd build

In the following step the error occurs:

cmake -DWITH_PYTHON=ON ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:32 (generate_export_header):
Unknown CMake command "generate_export_header".
Call Stack (most recent call first):
core/CMakeLists.txt:128 (casadi_library)


CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 2.8)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!

Kind regards,
Philippe Nimmegeers

Philippe Nimmegeers

unread,
Apr 10, 2015, 4:52:24 AM4/10/15
to casadi...@googlegroups.com
This problem is solved, thanks to my colleague Mattia. Apparently my build directory was in a wrong casadi directory (casadi/casadi/build, instead of casadi/build). 
Thanks for the help! 

Reply all
Reply to author
Forward
0 new messages