Hello,
I try to compile cgnslib 3.1.4-2 with cmake but it failed.
I have exactly the same problem with the first cgnslib 3.1 release.
I use cmake 2.6-patch4 and gcc 4.1.2 and Linux Redhat RHEL 5.4
cmake version 2.6-patch 4
Installation steps :
cd /home/user
tar xzf cgnslib_3.1.4-2.tar.gz
cd cgnslib_3.1.4
cmake /home/webadm//cgnslib_3.1.4/src
-- 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:36 (if):
if had incorrect arguments: ${SIZE_OF_LONG} GREATER 4 (Unknown arguments
specified).
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 2.6)
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!
Can you fix the the error :
CMake Error at CMakeLists.txt:36 (if):
if had incorrect arguments: ${SIZE_OF_LONG} GREATER 4 (Unknown arguments
specified). ?
Or can you explain me a workaround to bypass this error ?
Best Regards.
Thanks.
I have exactly the same problem with cgnslib_3.2.1.
It is more easy to compile cgnslib 2.5.5 than 3.x :( .
specify source folder correctly to cmake command.
$ cmake PATH_TO_CGNS_FOLDER/cgnslib_3.1.4/
Don't use "PATH_TO_CGNS_FOLDER/cgnslib_3.1.4/src". This gives error. Its weird but this works.
I am getting an error for both options
option (1): $cmake PATH_TO_CGNS_FOLDER/cgnslib_3.2.1/src
error as described above by "abc"
option (2): $ cmake PATH_TO_CGNS_FOLDER/cgnslib_3.2.1/
CMake Error: The source "PATH_TO_CGNS_FOLDER/cgnslib_3.2.1/CMakeLists.txt" does not match the source "PATH_TO_CGNS_FOLDER/cgnslib_3.2.1/scr/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
Last edit: anfho 2014-05-29