ecmwf / fckit

A Fortran toolkit for interoperating Fortran with C/C++
https://confluence.ecmwf.int/display/fckit
Apache License 2.0
29 stars 13 forks source link

C not enabled in the CMakeLists.txt? #1

Closed DJDavies2 closed 6 years ago

DJDavies2 commented 6 years ago

Using cmake 3.11.2, running with these options:

-DCMAKE_CXX_COMPILER="$HOME/installs/gcc/7.1.0/v1/bin/g++" \ -DCMAKE_CXX_FLAGS="-g" \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath=$HOME/installs/gcc/7.1.0/v1/lib" \ -DCMAKE_Fortran_COMPILER="$HOME/installs/gcc/7.1.0/v1/bin/gfortran" \ -DCMAKE_Fortran_FLAGS="-fbacktrace -g" \ -DCMAKE_INSTALL_PREFIX=$HOME/installs/oops-stuff/fckit \ -DCMAKE_MODULE_PATH=$HOME/installs/oops-stuff/ecbuild/share/ecbuild/cmake \ -DECKIT_PATH=$HOME/installs/oops-stuff/eckit

gets this in the output:

-- Looking for sys/types.h CMake Error at /home/david/installs/oops-stuff/cmake/share/cmake-3.11/Modules/CheckIncludeFile.cmake:58 (try_compile): Unknown extension ".c" for file

/home/david/src/oops-stuff/fckit/fckit-build/CMakeFiles/CMakeTmp/CheckIncludeFile.c

try_compile() works only for enabled languages. Currently these are:

CXX Fortran

See project() command to enable other languages. Call Stack (most recent call first): /home/david/installs/oops-stuff/cmake/share/cmake-3.11/Modules/CheckTypeSize.cmake:225 (check_include_file) /home/david/installs/oops-stuff/ecbuild/share/ecbuild/cmake/ecbuild_check_os.cmake:13 (check_type_size) /home/david/installs/oops-stuff/ecbuild/share/ecbuild/cmake/ecbuild_system.cmake:236 (include) CMakeLists.txt:22 (include)

-- Looking for sys/types.h - not found -- Looking for stdint.h CMake Error at /home/david/installs/oops-stuff/cmake/share/cmake-3.11/Modules/CheckIncludeFile.cmake:58 (try_compile): Unknown extension ".c" for file

/home/david/src/oops-stuff/fckit/fckit-build/CMakeFiles/CMakeTmp/CheckIncludeFile.c

try_compile() works only for enabled languages. Currently these are:

CXX Fortran

See project() command to enable other languages. Call Stack (most recent call first): /home/david/installs/oops-stuff/cmake/share/cmake-3.11/Modules/CheckTypeSize.cmake:226 (check_include_file) /home/david/installs/oops-stuff/ecbuild/share/ecbuild/cmake/ecbuild_check_os.cmake:13 (check_type_size) /home/david/installs/oops-stuff/ecbuild/share/ecbuild/cmake/ecbuild_system.cmake:236 (include) CMakeLists.txt:22 (include)

-- Looking for stdint.h - not found -- Looking for stddef.h CMake Error at /home/david/installs/oops-stuff/cmake/share/cmake-3.11/Modules/CheckIncludeFile.cmake:58 (try_compile): Unknown extension ".c" for file

/home/david/src/oops-stuff/fckit/fckit-build/CMakeFiles/CMakeTmp/CheckIncludeFile.c

try_compile() works only for enabled languages. Currently these are:

CXX Fortran

See project() command to enable other languages. Call Stack (most recent call first): /home/david/installs/oops-stuff/cmake/share/cmake-3.11/Modules/CheckTypeSize.cmake:227 (check_include_file) /home/david/installs/oops-stuff/ecbuild/share/ecbuild/cmake/ecbuild_check_os.cmake:13 (check_type_size) /home/david/installs/oops-stuff/ecbuild/share/ecbuild/cmake/ecbuild_system.cmake:236 (include) CMakeLists.txt:22 (include)

-- Looking for stddef.h - not found -- Check size of void* CMake Error at /home/david/installs/oops-stuff/cmake/share/cmake-3.11/Modules/CheckTypeSize.cmake:116 (try_compile): Unknown extension ".c" for file

/home/david/src/oops-stuff/fckit/fckit-build/CMakeFiles/CheckTypeSize/CMAKE_SIZEOF_VOID_P.c

try_compile() works only for enabled languages. Currently these are:

CXX Fortran

See project() command to enable other languages. Call Stack (most recent call first): /home/david/installs/oops-stuff/cmake/share/cmake-3.11/Modules/CheckTypeSize.cmake:241 (__check_type_size_impl) /home/david/installs/oops-stuff/ecbuild/share/ecbuild/cmake/ecbuild_check_os.cmake:13 (check_type_size) /home/david/installs/oops-stuff/ecbuild/share/ecbuild/cmake/ecbuild_system.cmake:236 (include) CMakeLists.txt:22 (include)

and the cmake command carries on but ultimately fails.

wdeconinck commented 6 years ago

Merged and released in version 0.5.1