Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed "Unknown extension"-problem during CMake init. #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jan 27, 2020

  1. Fixed "Unknown extension"-problem during CMake init.

    When running CMake to initialize the build folder, the following error
    occured:
    
    ```
    -- Looking for include file inttypes.h
    CMake Error at /usr/share/cmake-3.10/Modules/CheckIncludeFiles.cmake:69 (try_compile):
      Unknown extension ".c" for file
    
        /home/pkok/cpp-serializers/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c
    
      try_compile() works only for enabled languages.  Currently these are:
    
        CXX
    
      See project() command to enable other languages.
    Call Stack (most recent call first):
      CMakeLists.txt:23 (CHECK_INCLUDE_FILES)
    
    -- Looking for include file inttypes.h - not found
    -- Looking for include file netinet/in.h
    CMake Error at /usr/share/cmake-3.10/Modules/CheckIncludeFiles.cmake:69 (try_compile):
      Unknown extension ".c" for file
    
        /home/pkok/cpp-serializers/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c
    
      try_compile() works only for enabled languages.  Currently these are:
    
        CXX
    
      See project() command to enable other languages.
    Call Stack (most recent call first):
      CMakeLists.txt:24 (CHECK_INCLUDE_FILES)
    ```
    
    This seems to be [a common
    problem](http://www.grokit.ca/cnt/CMakeProblemsSolutions/).  This can be
    fixed by telling CMake that you also want to use the C language in the
    project.  This has been done in l.2 of `CMakeLists.txt`.
    pkok committed Jan 27, 2020
    Configuration menu
    Copy the full SHA
    1780fe8 View commit details
    Browse the repository at this point in the history