Giter Club home page Giter Club logo

Comments (10)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 13, 2024
[deleted comment]

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 13, 2024
The attached patch fix the problem for me but I believe it is not what you want 
otherwise FindThreadsCXX.cmake wouldn't exist.

IMHO, avoiding C and using CXX only is not such a good idea, I tried it once 
and it bit me with the CMake modules. Same problem here apparently.

Original comment by [email protected] on 27 Nov 2014 at 11:18

Attachments:

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 13, 2024
Thanks for the report. As you use a recent CMake version, can you try what 
happens when you comment the set(CMAKE_MODULE_PATH ...) in the CMakeLists.txt 
file of gflags ? I copied the CMake files just from the development branch of 
CMake and made minor fixes that were not in their yet. It may well be that 
these issues were fixed in the meantime. If it doesn't help, going back to 
C/CXX languages is a viable option to avoid these problems until the CMake 
modules work fine with CXX only.

Original comment by [email protected] on 27 Nov 2014 at 11:42

  • Added labels: Milestone-v2.1.2

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 13, 2024
In my version of CMake the C language is still required by the CMake modules.

...
-- Looking for stddef.h
CMake Error at 
/home/gpapin/pkg/cmake-3.0.2-Linux-i386/share/cmake-3.0/Modules/CheckIncludeFile
.cmake:58 (try_compile):
  Unknown extension ".c" for file

    /home/gpapin/pkg/gflags-2.1.1/build/CMakeFiles/CMakeTmp/CheckIncludeFile.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):
  /home/gpapin/pkg/cmake-3.0.2-Linux-i386/share/cmake-3.0/Modules/CheckTypeSize.cmake:223 (check_include_file)
  CMakeLists.txt:116 (check_type_size)
...

Did you know if an issue was reported to the CMake guys?

Original comment by [email protected] on 27 Nov 2014 at 12:54

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 13, 2024
To bad, I reported the bug and it has been fixed, though, see 
https://www.cmake.org/Bug/view.php?id=14056&history=1.

Original comment by [email protected] on 27 Nov 2014 at 1:10

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 13, 2024
I.e. CMake 3.1 should be fine. Any chance you can quickly download and install 
the release candidate for this version and try again? Would be interesting to 
see if we then could not make use of the CMake modules included in the gflags 
project and get rid of them eventually (once CMake 3.1 is the minimum default 
on most systems).

Original comment by [email protected] on 27 Nov 2014 at 1:13

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 13, 2024
Okay, it looks like CheckTypeSize was fixed to support CXX only: 
http://www.cmake.org/Bug/view.php?id=14056

But in practice, it still doesn't work with my CMake version (3.0.2) which 
includes this change. Also IIUC, gflags fixed other modules than CheckTypeSize.

Original comment by [email protected] on 27 Nov 2014 at 1:17

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 13, 2024
I saw your messages after I submitted one, looks like that was your bug that I 
found.

Anyway, I downloaded cmake 3.1 rc2 and the example from the bug report works 
now.

On the other hand compiling gflags still fails due to pthread which hasn't been 
fixed.

-- Looking for include file pthread.h
CMake Error at 
/home/gpapin/pkg/cmake-3.1.0-rc2-Linux-i386/share/cmake-3.1/Modules/CheckInclude
Files.cmake:74 (try_compile):
  Unknown extension ".c" for file

    /home/gpapin/pkg/gflags-2.1.1/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):
  /home/gpapin/pkg/cmake-3.1.0-rc2-Linux-i386/share/cmake-3.1/Modules/FindThreads.cmake:123 (CHECK_INCLUDE_FILES)
  CMakeLists.txt:157 (find_package)


Original comment by [email protected] on 27 Nov 2014 at 1:25

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 13, 2024
I see, thanks for giving it a try. Maybe the safest option is then to just 
apply your patch and revert to C+CXX. Just wanted to avoid all the C compiler 
checks to speed up configuration.

Original comment by [email protected] on 27 Nov 2014 at 4:05

from gflags.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 13, 2024
Yeah I understand the concern as I tried this myself once.

I think it's best to just enable C for now and maybe one day, when CMake 
supports CXX-only project more easily you will be able to call 
enable_language(C) only for CMake versions prior to this one.

Best,
Guillaume

Original comment by [email protected] on 27 Nov 2014 at 4:26

from gflags.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.