Comments (10)
[deleted comment]
from gflags.
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.
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.
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.
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.
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.
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.
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.
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.
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)
- Add ability to have options that can be specified multiple times. HOT 2
- Please put the label 'google' on this project HOT 5
- Warnings in Visual Studio 2010 and unable to compile unit test HOT 10
- Can't locate auto/Autom4te/XFile/msg.al in @INC HOT 2
- How to set kRootDir for FlagValue::CleanName
- Support NuGet package generation for Windows users HOT 1
- @GFLAGS_IS_A_DLL@ expands to empty string in gflags_declare.h HOT 6
- Set INTERFACE_COMPILE_DEFINITIONS of imported gflags library targets to define GFLAGS_DLL_DECL HOT 2
- Google glog fails to compile against gflags HOT 5
- Google glog fails to find gflags/gflags.h when using google namespace HOT 4
- Compilation error on Windows when trying to use the library. HOT 2
- Add library versioning (soname) HOT 6
- Import symbols into google namespace to maintain backwards compatibility HOT 10
- Flags always have default value HOT 1
- Bad soname version in current git master HOT 10
- Incorrect makefile generation with cmake HOT 1
- compile problem HOT 5
- Support uint32 as flag type
- ReloadNonCommandFlags needed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gflags.