Merge topic 'module-no-soname'

56148fd Do not crash on SHARED library without language (#13324)
This commit is contained in:
David Cole 2012-06-21 11:55:15 -04:00 committed by CMake Topic Stage
commit ae6f9b015f
8 changed files with 16 additions and 2 deletions

View File

@ -2203,8 +2203,12 @@ bool cmMakefile::PlatformIs64Bit() const
const char* cmMakefile::GetSONameFlag(const char* language) const const char* cmMakefile::GetSONameFlag(const char* language) const
{ {
std::string name = "CMAKE_SHARED_LIBRARY_SONAME_"; std::string name = "CMAKE_SHARED_LIBRARY_SONAME";
name += language; if(language)
{
name += "_";
name += language;
}
name += "_FLAG"; name += "_FLAG";
return GetDefinition(name.c_str()); return GetDefinition(name.c_str());
} }

View File

@ -45,6 +45,7 @@ macro(add_RunCMake_test test)
) )
endmacro() endmacro()
add_RunCMake_test(Languages)
add_RunCMake_test(ObjectLibrary) add_RunCMake_test(ObjectLibrary)
add_RunCMake_test(build_command) add_RunCMake_test(build_command)

View File

@ -0,0 +1,3 @@
cmake_minimum_required(VERSION 2.8)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake)

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1 @@
CMake Error: CMake can not determine linker language for target:NoLang

View File

@ -0,0 +1 @@
add_library(NoLang SHARED foo.nolang)

View File

@ -0,0 +1,3 @@
include(RunCMake)
run_cmake(NoLangSHARED)

View File