[cmake-developers] [CMake 0013171]: Default target LINKER_LANGUAGE un-gettable.
Mantis Bug Tracker
mantis at public.kitware.com
Thu Apr 26 14:15:02 EDT 2012
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
======================================================================
More information about the cmake-developers
mailing list