mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-30 11:10:06 -05:00
try_run: Add support for LINK_LIBRARIES option.
Most functionality is already implemented in Source/cmCoreTryCompile.{h,cxx}.
Document and improve argument parsing.
This functionality is already being used by a number of modules, like
CheckCSourceCompiles.cmake, but it is not documented.
This commit is contained in:
committed by
Brad King
parent
07cbe3640e
commit
e2b1f0583f
@@ -109,7 +109,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
||||
}
|
||||
default:
|
||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR,
|
||||
"Only libraries may be used as try_compile IMPORTED "
|
||||
"Only libraries may be used as try_compile or try_run IMPORTED "
|
||||
"LINK_LIBRARIES. Got " + std::string(tgt->GetName()) + " of "
|
||||
"type " + tgt->GetTargetTypeName(tgt->GetType()) + ".");
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user