GHS: Fix try_compile (#15975)

This commit is contained in:
Geoff Viola 2016-03-21 05:00:35 -06:00 committed by Brad King
parent cd992170db
commit bf3e76d214
3 changed files with 12 additions and 2 deletions

View File

@ -12,6 +12,8 @@ set(CMAKE_C_GHS_KERNEL_FLAGS_RELEASE_INIT "${CMAKE_C_FLAGS_RELEASE_INIT}")
set(CMAKE_C_GHS_KERNEL_FLAGS_RELWITHDEBINFO_INIT
"-ldebug ${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}")
set(CMAKE_EXECUTABLE_SUFFIX ".as")
if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
set (CMAKE_C_GHS_KERNEL_FLAGS_DEBUG "${CMAKE_C_GHS_KERNEL_FLAGS_DEBUG_INIT}"
CACHE STRING "Kernel flags used by the compiler during debug builds.")

View File

@ -15,6 +15,8 @@ set(CMAKE_CXX_GHS_KERNEL_FLAGS_RELEASE_INIT
set(CMAKE_CXX_GHS_KERNEL_FLAGS_RELWITHDEBINFO_INIT
"-ldebug ${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}")
set(CMAKE_EXECUTABLE_SUFFIX ".as")
if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
set (CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG
"${CMAKE_CXX_GHS_KERNEL_FLAGS_DEBUG_INIT}"

View File

@ -217,8 +217,11 @@ void cmGhsMultiTargetGenerator::WriteTypeSpecifics(const std::string &config,
if (this->GeneratorTarget->GetType() == cmState::STATIC_LIBRARY)
{
std::string const static_library_suffix =
this->Makefile->GetSafeDefinition("CMAKE_STATIC_LIBRARY_SUFFIX");
*this->GetFolderBuildStreams() << " -o \""
<< outputDir << outputFilename << ".a\""
<< outputDir << outputFilename
<< static_library_suffix << "\""
<< std::endl;
}
else if (this->GeneratorTarget->GetType() == cmState::EXECUTABLE)
@ -238,8 +241,11 @@ void cmGhsMultiTargetGenerator::WriteTypeSpecifics(const std::string &config,
}
else
{
std::string const executable_suffix =
this->Makefile->GetSafeDefinition("CMAKE_EXECUTABLE_SUFFIX");
*this->GetFolderBuildStreams() << " -o \""
<< outputDir << outputFilename << ".as\""
<< outputDir << outputFilename
<< executable_suffix << "\""
<< std::endl;
}
}