Steve,

Please take a look at this example:

$ touch foo.h bar.cpp
$ cat CMakeLists.txt
cmake_minimum_required(VERSION 2.8.6)
project(FOO)
find_package(Qt4 REQUIRED)
add_library(bar STATIC bar.cpp)
set_target_properties(bar PROPERTIES AUTOMOC TRUE)
target_link_libraries(bar foo)
add_library(foo STATIC foo.h)
set_target_properties(foo PROPERTIES AUTOMOC TRUE)
$ mkdir b && cd b
$ cmake --version
cmake version 2.8.10.20130211-ge1f90
$ cmake ..
-- Configuring done
CMake Error: CMake can not determine linker language for target:foo
Segmentation fault

The failure bisects to the main tll usage requirements change:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1c4905f

See the stack trace below.  In isLinkDependentProperty the
tgt->GetLinkInformation(config) returns NULL.

Please fix and add this case to the tests.

Thanks,
-Brad



#0  0x00000000006fd56a in std::vector<cmComputeLinkInformation::Item, 
std::allocator<cmComputeLinkInformation::Item> >::begin (this=0x0)
    at /usr/include/c++/4.7/bits/stl_vector.h:528
#1  0x00000000006f3ad1 in isLinkDependentProperty (tgt=0xe519a8, p=..., 
interfaceProperty=0x9b6e96 "COMPATIBLE_INTERFACE_BOOL", config=0x0)
    at .../CMake/Source/cmTarget.cxx:4846
#2  0x00000000006f3d0e in cmTarget::IsLinkInterfaceDependentBoolProperty 
(this=0xe519a8, p=..., config=0x0)
    at .../CMake/Source/cmTarget.cxx:4885
#3  0x000000000081a65a in TargetPropertyNode::Evaluate (this=0xd3f310, 
parameters=..., context=0x7fffffffcdd0, content=0xe43670,
    dagCheckerParent=0x7fffffffd140) at 
.../CMake/Source/cmGeneratorExpressionEvaluator.cxx:517
#4  0x0000000000817587 in GeneratorExpressionContent::Evaluate (this=0xe43670, 
context=0x7fffffffcdd0, dagChecker=0x7fffffffd140)
    at .../CMake/Source/cmGeneratorExpressionEvaluator.cxx:1172
#5  0x000000000082017b in cmCompiledGeneratorExpression::Evaluate 
(this=0xe4ccb0, mf=0xd75df0, config=0x0, quiet=false, headTarget=0xe50fb8,
    currentTarget=0xe50fb8, dagChecker=0x7fffffffd140) at 
.../CMake/Source/cmGeneratorExpression.cxx:98
#6  0x0000000000820017 in cmCompiledGeneratorExpression::Evaluate 
(this=0xe4ccb0, mf=0xd75df0, config=0x0, quiet=false, headTarget=0xe50fb8,
    dagChecker=0x7fffffffd140) at .../CMake/Source/cmGeneratorExpression.cxx:64
#7  0x00000000006eb954 in processIncludeDirectories (tgt=0xe50fb8, entries=..., 
includes=..., uniqueIncludes=..., dagChecker=0x7fffffffd140, config=0x0,
    debugIncludes=false) at .../CMake/Source/cmTarget.cxx:2793
#8  0x00000000006ec54a in cmTarget::GetIncludeDirectories (this=0xe50fb8, 
config=0x0) at .../CMake/Source/cmTarget.cxx:2905
#9  0x0000000000822d64 in cmGeneratorTarget::GetIncludeDirectories 
(this=0x7fffffffd6c0, config=0x0)
    at .../CMake/Source/cmGeneratorTarget.cxx:255
#10 0x000000000085acf5 in cmLocalGenerator::GetIncludeDirectories 
(this=0xd75b90, dirs=..., target=0x7fffffffd6c0, lang=0xa21dfe "CXX", 
config=0x0,
    stripImplicitInclDirs=false) at .../CMake/Source/cmLocalGenerator.cxx:1431
#11 0x0000000000898faa in cmQtAutomoc::SetupAutomocTarget (this=0x7fffffffdb20, 
target=0xe50fb8)
    at .../CMake/Source/cmQtAutomoc.cxx:219
#12 0x0000000000828997 in cmGlobalGenerator::CreateAutomocTargets 
(this=0xd755c0) at .../CMake/Source/cmGlobalGenerator.cxx:1087
#13 0x0000000000828053 in cmGlobalGenerator::Generate (this=0xd755c0) at 
.../CMake/Source/cmGlobalGenerator.cxx:937
#14 0x000000000083e55c in cmGlobalUnixMakefileGenerator3::Generate 
(this=0xd755c0)
    at .../CMake/Source/cmGlobalUnixMakefileGenerator3.cxx:109
#15 0x000000000071b60b in cmake::Generate (this=0x7fffffffe230) at 
.../CMake/Source/cmake.cxx:2590
#16 0x000000000071b45e in cmake::Run (this=0x7fffffffe230, args=..., 
noconfigure=false) at .../CMake/Source/cmake.cxx:2570
#17 0x000000000066d1f9 in do_cmake (ac=2, av=0x7fffffffe718) at 
.../CMake/Source/cmakemain.cxx:527
#18 0x000000000066c6d2 in main (ac=2, av=0x7fffffffe718) at 
.../CMake/Source/cmakemain.cxx:338
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to