View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012426CMake(No Category)public2011-08-27 12:502016-06-10 14:31
ReporterStephen Kelly 
Assigned ToAlex Neundorf 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0012426: cmake --find-package doesn't seem to set language correctly
DescriptionI also note that it creates some output files in $PWD which it does not clear up afterward.

kde-devel@bishop:~/dev/src/kf5/tier1/itemmodels{frameworks}$ cmake --find-package -DNAME=Grantlee -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=EXIST
CMake Error at /home/kde-devel/dev/qt47/kde46/share/cmake-2.8/Modules/CheckSymbolExists.cmake:69 (TRY_COMPILE):
  Unknown extension ".cxx" for file

    /home/kde-devel/dev/src/kf5/tier1/itemmodels/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx

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

   

  See project() command to enable other languages.
Call Stack (most recent call first):
  /home/kde-devel/dev/qt47/kde46/share/cmake-2.8/Modules/CheckCXXSymbolExists.cmake:41 (_CHECK_SYMBOL_EXISTS)
  /home/kde-devel/dev/qt47/kde46/share/cmake-2.8/Modules/FindQt4.cmake:718 (CHECK_CXX_SYMBOL_EXISTS)
  /home/kde-devel/dev/qt47/kde46/lib/cmake/grantlee/GrantleeConfig.cmake:19 (find_package)
  /home/kde-devel/dev/qt47/kde46/share/cmake-2.8/Modules/CMakeFindPackageMode.cmake:166 (find_package)


Grantlee not found.
CMake Error: Problem processing arguments. Aborting.
TagsNo tags attached.
Attached Files

 Relationships
child of 0014676closedAlex Neundorf cmake --find-package summary ticket 

  Notes
(0027410)
Alex Neundorf (developer)
2011-09-12 17:11

Hmm, this is not an easy one...

It does a try_compile(), and try_compile() needs a fully set up toolchain. But most of this is skipped in this mode.

Alex
(0027432)
Alex Neundorf (developer)
2011-09-16 07:41

I merged a fix into next, which gives a better error message:
"The TRY_COMPILE() command is not supported in --find-package mode."

This doesn't make it work, but IMO is much better.
This means some modules do not work in --find-package mode.
But I'd consider this good enough for releasing as a first version.

What do you think ?

Alex
(0027433)
Stephen Kelly (developer)
2011-09-16 10:40

I think it depends on whether it's fixable. In the current state, even attempting to find Qt will fail.

cmake --find-package -DNAME=Qt -DCOMPILER_ID=GNU -DLANGUAGE=CXX -DMODE=EXIST

I'm not familiar with why it doesn't more fully set up a toolchain (speed?), but if that can be fixed in the future maybe it's ok.

In the current state anything using struct_has_member, check_symbol_exists etc will not work. I don't know how common that is in find files or config files, but if it's common, then I don't think there's any rush to put the feature into cmake until the issue is resolved.
(0027442)
Alex Neundorf (developer)
2011-09-16 18:25

FindQt4.cmake is probably the most complex Find-module coming with cmake.
Ok, boost maybe.

Config-files should not have those tests, since they should know what features the package they belong to have.
So I also had the idea to support only Config-mode, but as it is now, additionally also Find-module which don't have any try_compile()s will work.
(0041894)
Kitware Robot (administrator)
2016-06-10 14:28

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2011-08-27 12:50 Stephen Kelly New Issue
2011-08-29 10:09 Brad King Assigned To => Alex Neundorf
2011-08-29 10:09 Brad King Status new => assigned
2011-09-12 17:11 Alex Neundorf Note Added: 0027410
2011-09-12 17:12 Alex Neundorf Priority normal => high
2011-09-12 17:12 Alex Neundorf Description Updated
2011-09-16 07:41 Alex Neundorf Note Added: 0027432
2011-09-16 10:40 Stephen Kelly Note Added: 0027433
2011-09-16 18:25 Alex Neundorf Note Added: 0027442
2012-08-13 14:32 Alex Neundorf Priority high => normal
2012-08-13 14:32 Alex Neundorf Status assigned => backlog
2014-01-01 12:21 Alex Neundorf Relationship added child of 0014676
2016-06-10 14:28 Kitware Robot Note Added: 0041894
2016-06-10 14:28 Kitware Robot Status backlog => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team