Merge remote-tracking branch 'origin/maint'

This commit is contained in:
Kolan Sh 2016-04-18 00:36:26 +03:00
commit 96f7238ccc
20 changed files with 58 additions and 43 deletions

View File

@ -19,7 +19,7 @@ set(ASM_DIALECT "-ATT")
# assembler but should be processed by gcc # assembler but should be processed by gcc
set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;asm) set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;asm)
set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>") set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <INCLUDES> <FLAGS> -o <OBJECT> <SOURCE>")
include(CMakeASMInformation) include(CMakeASMInformation)
set(ASM_DIALECT) set(ASM_DIALECT)

View File

@ -38,7 +38,7 @@ if(NOT CMAKE_ASM_NASM_OBJECT_FORMAT)
endif() endif()
endif() endif()
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> <FLAGS> -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} -o <OBJECT> <SOURCE>") set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> <INCLUDES> <FLAGS> -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} -o <OBJECT> <SOURCE>")
# Load the generic ASMInformation file: # Load the generic ASMInformation file:
set(ASM_DIALECT "_NASM") set(ASM_DIALECT "_NASM")

View File

@ -3,5 +3,5 @@ include(Compiler/ARMCC)
set(CMAKE_ASM_OUTPUT_EXTENSION ".o") set(CMAKE_ASM_OUTPUT_EXTENSION ".o")
set(CMAKE_ASM_OUTPUT_EXTENSION_REPLACE 1) set(CMAKE_ASM_OUTPUT_EXTENSION_REPLACE 1)
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>") set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <INCLUDES> <FLAGS> -o <OBJECT> <SOURCE>")
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa) set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa)

View File

@ -45,7 +45,7 @@
# of GSL installation discovered. These variables may optionally be set to # of GSL installation discovered. These variables may optionally be set to
# help this module find the correct files:: # help this module find the correct files::
# #
# GSL_CLBAS_LIBRARY - Location of the GSL CBLAS library. # GSL_CBLAS_LIBRARY - Location of the GSL CBLAS library.
# GSL_CBLAS_LIBRARY_DEBUG - Location of the debug GSL CBLAS library (if any). # GSL_CBLAS_LIBRARY_DEBUG - Location of the debug GSL CBLAS library (if any).
# GSL_CONFIG_EXECUTABLE - Location of the ``gsl-config`` script (if any). # GSL_CONFIG_EXECUTABLE - Location of the ``gsl-config`` script (if any).
# GSL_LIBRARY - Location of the GSL library. # GSL_LIBRARY - Location of the GSL library.

View File

@ -140,6 +140,10 @@ function(xctest_add_bundle target testee)
set_target_properties(${target} PROPERTIES set_target_properties(${target} PROPERTIES
XCODE_ATTRIBUTE_BUNDLE_LOADER "$(TEST_HOST)" XCODE_ATTRIBUTE_BUNDLE_LOADER "$(TEST_HOST)"
XCODE_ATTRIBUTE_TEST_HOST "$<TARGET_FILE:${testee}>") XCODE_ATTRIBUTE_TEST_HOST "$<TARGET_FILE:${testee}>")
if(NOT XCODE_VERSION VERSION_LESS 7.3)
set_target_properties(${target} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "$<TARGET_FILE_DIR:${testee}>/../PlugIns")
endif()
else(XCODE) else(XCODE)
target_link_libraries(${target} target_link_libraries(${target}
PRIVATE -bundle_loader $<TARGET_FILE:${testee}>) PRIVATE -bundle_loader $<TARGET_FILE:${testee}>)

View File

@ -3,5 +3,5 @@ include(Platform/Generic-ADSP-Common)
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm) set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm)
set(CMAKE_ASM_OUTPUT_EXTENSION ".doj" ) set(CMAKE_ASM_OUTPUT_EXTENSION ".doj" )
set(CMAKE_ASM_COMPILE_OBJECT set(CMAKE_ASM_COMPILE_OBJECT
"<CMAKE_ASM_COMPILER> <FLAGS> -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o <OBJECT> <SOURCE>") "<CMAKE_ASM_COMPILER> <INCLUDES> <FLAGS> -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o <OBJECT> <SOURCE>")

View File

@ -4,7 +4,7 @@ else()
set(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj) set(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj)
endif() endif()
set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>") set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <INCLUDES> <FLAGS> -o <OBJECT> <SOURCE>")
set(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY set(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY
"<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> " "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "

View File

@ -1,5 +1,5 @@
# CMake version number components. # CMake version number components.
set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 5) set(CMake_VERSION_MINOR 5)
set(CMake_VERSION_PATCH 1) set(CMake_VERSION_PATCH 2)
#set(CMake_VERSION_RC 0) #set(CMake_VERSION_RC 0)

View File

@ -117,7 +117,7 @@ void cmFLTKWrapUICommand::FinalPass()
// people should add the srcs to the target themselves, but the old command // people should add the srcs to the target themselves, but the old command
// didn't support that, so check and see if they added the files in and if // didn't support that, so check and see if they added the files in and if
// they didn;t then print a warning and add then anyhow // they didn;t then print a warning and add then anyhow
cmTarget* target = this->Makefile->FindTarget(this->Target); cmTarget* target = this->Makefile->FindLocalNonAliasTarget(this->Target);
if(!target) if(!target)
{ {
std::string msg = std::string msg =

View File

@ -229,7 +229,7 @@ void cmFortranParser_RuleLineDirective(cmFortranParser* parser,
cmSystemTools::ConvertToUnixSlashes(included); cmSystemTools::ConvertToUnixSlashes(included);
// Save the named file as included in the source. // Save the named file as included in the source.
if (cmSystemTools::FileExists(included)) if (cmSystemTools::FileExists(included, true))
{ {
parser->Info.Includes.insert(included); parser->Info.Includes.insert(included);
} }

View File

@ -381,7 +381,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
return false; return false;
} }
// Lookup this target in the current directory. // Lookup this target in the current directory.
if(cmTarget* target=this->Makefile->FindTarget(*targetIt)) if(cmTarget* target=this->Makefile->FindLocalNonAliasTarget(*targetIt))
{ {
// Found the target. Check its type. // Found the target. Check its type.
if(target->GetType() != cmState::EXECUTABLE && if(target->GetType() != cmState::EXECUTABLE &&

View File

@ -446,7 +446,7 @@ cmInstallTargetGenerator::GetInstallFilename(cmGeneratorTarget const* target,
void cmInstallTargetGenerator::Compute(cmLocalGenerator* lg) void cmInstallTargetGenerator::Compute(cmLocalGenerator* lg)
{ {
this->Target = lg->FindGeneratorTarget(this->TargetName); this->Target = lg->FindLocalNonAliasGeneratorTarget(this->TargetName);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------

View File

@ -485,19 +485,9 @@ private:
std::string Name; std::string Name;
}; };
cmGeneratorTarget* cmLocalGenerator::FindGeneratorTarget( cmGeneratorTarget* cmLocalGenerator::FindLocalNonAliasGeneratorTarget(
const std::string& name) const const std::string& name) const
{ {
std::map<std::string, std::string>::const_iterator i =
this->AliasTargets.find(name);
if (i != this->AliasTargets.end())
{
std::vector<cmGeneratorTarget*>::const_iterator ai =
std::find_if(this->GeneratorTargets.begin(),
this->GeneratorTargets.end(),
NamedGeneratorTargetFinder(i->second));
return *ai;
}
std::vector<cmGeneratorTarget*>::const_iterator ti = std::vector<cmGeneratorTarget*>::const_iterator ti =
std::find_if(this->GeneratorTargets.begin(), std::find_if(this->GeneratorTargets.begin(),
this->GeneratorTargets.end(), this->GeneratorTargets.end(),
@ -506,7 +496,6 @@ cmGeneratorTarget* cmLocalGenerator::FindGeneratorTarget(
{ {
return *ti; return *ti;
} }
return 0; return 0;
} }
@ -1839,7 +1828,7 @@ cmLocalGenerator::FindGeneratorTargetToUse(const std::string& name) const
return *imported; return *imported;
} }
if(cmGeneratorTarget* t = this->FindGeneratorTarget(name)) if(cmGeneratorTarget* t = this->FindLocalNonAliasGeneratorTarget(name))
{ {
return t; return t;
} }

View File

@ -129,7 +129,8 @@ public:
void AddImportedGeneratorTarget(cmGeneratorTarget* gt); void AddImportedGeneratorTarget(cmGeneratorTarget* gt);
void AddOwnedImportedGeneratorTarget(cmGeneratorTarget* gt); void AddOwnedImportedGeneratorTarget(cmGeneratorTarget* gt);
cmGeneratorTarget* FindGeneratorTarget(const std::string& name) const; cmGeneratorTarget*
FindLocalNonAliasGeneratorTarget(const std::string& name) const;
cmGeneratorTarget* FindGeneratorTargetToUse(const std::string& name) const; cmGeneratorTarget* FindGeneratorTargetToUse(const std::string& name) const;
/** /**

View File

@ -400,7 +400,7 @@ cmLocalNinjaGenerator::WriteCustomCommandBuildStatement(
bool symbolic = false; bool symbolic = false;
for (std::vector<std::string>::const_iterator o = outputs.begin(); for (std::vector<std::string>::const_iterator o = outputs.begin();
o != outputs.end(); ++o) !symbolic && o != outputs.end(); ++o)
{ {
if (cmSourceFile* sf = this->Makefile->GetSource(*o)) if (cmSourceFile* sf = this->Makefile->GetSource(*o))
{ {
@ -444,7 +444,7 @@ cmLocalNinjaGenerator::WriteCustomCommandBuildStatement(
this->ConstructComment(ccg), this->ConstructComment(ccg),
"Custom command for " + ninjaOutputs[0], "Custom command for " + ninjaOutputs[0],
cc->GetUsesTerminal(), cc->GetUsesTerminal(),
/*restat*/!symbolic, /*restat*/!symbolic || !byproducts.empty(),
ninjaOutputs, ninjaOutputs,
ninjaDeps, ninjaDeps,
orderOnlyDeps); orderOnlyDeps);

View File

@ -4058,25 +4058,13 @@ std::vector<std::string> cmMakefile::GetPropertyKeys() const
return this->StateSnapshot.GetDirectory().GetPropertyKeys(); return this->StateSnapshot.GetDirectory().GetPropertyKeys();
} }
cmTarget* cmMakefile::FindTarget(const std::string& name, cmTarget* cmMakefile::FindLocalNonAliasTarget(const std::string& name) const
bool excludeAliases) const
{ {
if (!excludeAliases)
{
std::map<std::string, std::string>::const_iterator i =
this->AliasTargets.find(name);
if (i != this->AliasTargets.end())
{
cmTargets::iterator ai = this->Targets.find(i->second);
return &ai->second;
}
}
cmTargets::iterator i = this->Targets.find( name ); cmTargets::iterator i = this->Targets.find( name );
if ( i != this->Targets.end() ) if ( i != this->Targets.end() )
{ {
return &i->second; return &i->second;
} }
return 0; return 0;
} }
@ -4247,7 +4235,7 @@ cmTarget* cmMakefile::FindTargetToUse(const std::string& name,
} }
// Look for a target built in this directory. // Look for a target built in this directory.
if(cmTarget* t = this->FindTarget(name, excludeAliases)) if(cmTarget* t = this->FindLocalNonAliasTarget(name))
{ {
return t; return t;
} }

View File

@ -388,8 +388,7 @@ public:
} }
std::vector<cmTarget*> GetImportedTargets() const; std::vector<cmTarget*> GetImportedTargets() const;
cmTarget* FindTarget(const std::string& name, cmTarget* FindLocalNonAliasTarget(const std::string& name) const;
bool excludeAliases = false) const;
/** Find a target to use in place of the given name. The target /** Find a target to use in place of the given name. The target
returned may be imported or built within the project. */ returned may be imported or built within the project. */

View File

@ -1,3 +1,8 @@
add_library(tgt STATIC empty.cpp) add_library(tgt STATIC empty.cpp)
add_library(Sub::tgt ALIAS tgt) add_library(Sub::tgt ALIAS tgt)
# foo comes from the top-level CMakeLists.txt
add_library(Top::foo ALIAS foo)
get_target_property(some_prop Top::foo SOME_PROP)
target_link_libraries(tgt Top::foo)

View File

@ -0,0 +1,28 @@
add_custom_command(
OUTPUT gen-byproduct gen-byproduct-stamp
BYPRODUCTS byproduct
COMMAND ${CMAKE_COMMAND} -E touch gen-byproduct-stamp
COMMAND ${CMAKE_COMMAND} -E copy_if_different gen-byproduct-stamp byproduct
)
set_property(SOURCE gen-byproduct PROPERTY SYMBOLIC 1)
add_custom_target(produce DEPENDS gen-byproduct)
add_custom_command(
OUTPUT use-byproduct
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/byproduct
COMMAND ${CMAKE_COMMAND} -E touch use-byproduct
)
add_custom_target(drive ALL DEPENDS use-byproduct)
add_dependencies(drive produce)
file(GENERATE OUTPUT check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
if (check_step EQUAL 1)
set(check_pairs
\"${CMAKE_CURRENT_BINARY_DIR}/use-byproduct|${CMAKE_CURRENT_BINARY_DIR}/gen-byproduct-stamp\"
)
else()
set(check_pairs
\"${CMAKE_CURRENT_BINARY_DIR}/gen-byproduct-stamp|${CMAKE_CURRENT_BINARY_DIR}/use-byproduct\"
)
endif()
")

View File

@ -39,4 +39,5 @@ if(NOT RunCMake_GENERATOR MATCHES "Visual Studio [67]|Xcode")
unset(run_BuildDepends_skip_step_2) unset(run_BuildDepends_skip_step_2)
endif() endif()
run_BuildDepends(Custom-Symbolic-and-Byproduct)
run_BuildDepends(Custom-Always) run_BuildDepends(Custom-Always)