mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
try_compile: Add option to control type of target
Create a `CMAKE_TRY_COMPILE_TARGET_TYPE` option to specify use of `add_library(... STATIC ...)` for the generated test project. This will be useful for cross-compiling toolchains that cannot link a binary without custom flags or scripts.
This commit is contained in:
@@ -30,7 +30,7 @@ public:
|
||||
* commands, such as TryRun can access the same logic without
|
||||
* duplication.
|
||||
*/
|
||||
int TryCompileCode(std::vector<std::string> const& argv);
|
||||
int TryCompileCode(std::vector<std::string> const& argv, bool isTryRun);
|
||||
|
||||
/**
|
||||
* This deletes all the files created by TryCompileCode.
|
||||
@@ -44,8 +44,8 @@ public:
|
||||
TryCompileCode. The result is stored in OutputFile. If nothing is found,
|
||||
the error message is stored in FindErrorMessage.
|
||||
*/
|
||||
void FindOutputFile(const std::string& targetName);
|
||||
|
||||
void FindOutputFile(const std::string& targetName,
|
||||
cmState::TargetType targetType);
|
||||
|
||||
cmTypeMacro(cmCoreTryCompile, cmCommand);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user