target_link_options: fix erroneous handling of BEFORE keyword.
This commit is contained in:
parent
f0c84346ed
commit
6da8b67c3f
@ -33,9 +33,9 @@ std::string cmTargetLinkOptionsCommand::Join(
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool cmTargetLinkOptionsCommand::HandleDirectContent(
|
bool cmTargetLinkOptionsCommand::HandleDirectContent(
|
||||||
cmTarget* tgt, const std::vector<std::string>& content, bool, bool)
|
cmTarget* tgt, const std::vector<std::string>& content, bool prepend, bool)
|
||||||
{
|
{
|
||||||
cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
|
cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
|
||||||
tgt->InsertLinkOption(this->Join(content), lfbt);
|
tgt->InsertLinkOption(this->Join(content), lfbt, prepend);
|
||||||
return true; // Successfully handled.
|
return true; // Successfully handled.
|
||||||
}
|
}
|
||||||
|
@ -24,3 +24,11 @@ get_target_property(result target_link_options_3 INTERFACE_LINK_OPTIONS)
|
|||||||
if (NOT result MATCHES "-INTERFACE_FLAG")
|
if (NOT result MATCHES "-INTERFACE_FLAG")
|
||||||
message(SEND_ERROR "target_link_options not populated the INTERFACE_LINK_OPTIONS target property of static library")
|
message(SEND_ERROR "target_link_options not populated the INTERFACE_LINK_OPTIONS target property of static library")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
add_library(target_link_options_4 SHARED EXCLUDE_FROM_ALL LinkOptionsLib.c)
|
||||||
|
target_link_options(target_link_options_4 PRIVATE -PRIVATE_FLAG)
|
||||||
|
target_link_options(target_link_options_4 BEFORE PRIVATE -BEFORE_PRIVATE_FLAG)
|
||||||
|
get_target_property(result target_link_options_4 LINK_OPTIONS)
|
||||||
|
if (NOT result MATCHES "-BEFORE_PRIVATE_FLAG.*-PRIVATE_FLAG")
|
||||||
|
message(SEND_ERROR "target_link_options not managing correctly 'BEFORE' keyword")
|
||||||
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user