The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=13171 
====================================================================== 
Reported By:                bungeman
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13171
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-04-26 14:15 EDT
Last Modified:              2012-04-26 14:15 EDT
====================================================================== 
Summary:                    Default target LINKER_LANGUAGE un-gettable.
Description: 
This was first reported on the mailing list here

http://www.cmake.org/pipermail/cmake/2009-May/029570.html

but apparently it never made it to the bug tracker as was suggested in the
reply. However, I recently ran into this issue. The basic problem is that the
defaults of many properties cannot be retrieved. CMake obviously knows what the
values are, but will not expose them.

Steps to Reproduce: 
Put something like the following into a CMakeLists.txt

add_executable(target
  target.c
)
get_target_property(TARGET_LINKER_LANGUAGE target LINKER_LANGUAGE)
message("TARGET_LINKER_LANGUAGE = ${TARGET_LINKER_LANGUAGE}")
if(${TARGET_LINKER_LANGUAGE} EQUAL "CXX")
set_property(TARGET target APPEND PROPERTIES COMPILE_FLAGS "-fno-rtti
-fno-threadsafe-statics -fvisibility-inlines-hidden -Wno-deprecated ")
endif()
unset(TARGET_LINKER_LANGUAGE)

The output looks like

TARGET_LINKER_LANGUAGE = TARGET_LINKER_LANGUAGE-NOTFOUND

and of course the 'if' will never evaluate to true.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-04-26 14:15 bungeman       New Issue                                    
======================================================================

--

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