diff options
-rw-r--r-- | Modules/CPackRPM.cmake | 1 | ||||
-rw-r--r-- | Modules/CTestTargets.cmake | 4 | ||||
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmFileCommand.h | 3 | ||||
-rw-r--r-- | Source/cmFindLibraryCommand.cxx | 8 | ||||
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 13 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.cxx | 10 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio10Generator.cxx | 18 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio6Generator.cxx | 29 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio6Generator.h | 1 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 40 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.h | 1 | ||||
-rw-r--r-- | Source/cmLocalVisualStudioGenerator.h | 2 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 3 | ||||
-rw-r--r-- | Source/cmQtAutomoc.cxx | 3 | ||||
-rw-r--r-- | Source/cmSourceFile.h | 3 | ||||
-rw-r--r-- | Source/kwsys/kwsysDateStamp.cmake | 2 |
17 files changed, 84 insertions, 59 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 442d7c4..cba746f 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -899,6 +899,7 @@ IF(RPMBUILD_EXECUTABLE) # Now call rpmbuild using the SPECFILE EXECUTE_PROCESS( COMMAND "${RPMBUILD_EXECUTABLE}" -bb + --define "_topdir ${CPACK_RPM_DIRECTORY}" --buildroot "${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" "${CPACK_RPM_BINARY_SPECFILE}" WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" diff --git a/Modules/CTestTargets.cmake b/Modules/CTestTargets.cmake index d66874d..bc4d964 100644 --- a/Modules/CTestTargets.cmake +++ b/Modules/CTestTargets.cmake @@ -69,7 +69,7 @@ IF(NOT _CTEST_TARGETS_ADDED) ENDFOREACH(mode) # For Makefile generators add more granular targets. - IF("${CMAKE_GENERATOR}" MATCHES Make) + IF("${CMAKE_GENERATOR}" MATCHES "(Ninja|Make)") # Make targets for Experimental builds FOREACH(mode Nightly Experimental Continuous) FOREACH(testtype @@ -83,7 +83,7 @@ IF(NOT _CTEST_TARGETS_ADDED) SET_PROPERTY(TARGET ${mode}${testtype} PROPERTY FOLDER "CTestDashboardTargets") ENDFOREACH(testtype) ENDFOREACH(mode) - ENDIF("${CMAKE_GENERATOR}" MATCHES Make) + ENDIF("${CMAKE_GENERATOR}" MATCHES "(Ninja|Make)") # If requested, add an alias that is the equivalent of the built-in "test" # or "RUN_TESTS" target: diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index ebd7c7f..65077b3 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -501,6 +501,7 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets( case cmTarget::STATIC_LIBRARY: case cmTarget::SHARED_LIBRARY: case cmTarget::MODULE_LIBRARY: + case cmTarget::OBJECT_LIBRARY: { const char* prefix = (ti->second.GetType()==cmTarget::EXECUTABLE ? "[exe] " : "[lib] "); @@ -1017,6 +1018,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const case cmTarget::STATIC_LIBRARY: case cmTarget::SHARED_LIBRARY: case cmTarget::MODULE_LIBRARY: + case cmTarget::OBJECT_LIBRARY: { const char* prefix = (ti->second.GetType()==cmTarget::EXECUTABLE ? "[exe] " : "[lib] "); diff --git a/Source/cmFileCommand.h b/Source/cmFileCommand.h index 3b368fa..ced26c4 100644 --- a/Source/cmFileCommand.h +++ b/Source/cmFileCommand.h @@ -152,7 +152,8 @@ public: "TO_CMAKE_PATH will convert path into a cmake style path with unix /. " " The input can be a single path or a system path like \"$ENV{PATH}\". " " Note the double quotes around the ENV call TO_CMAKE_PATH only takes " - " one argument.\n" + " one argument. This command will also convert the native list" + " delimiters for a list of paths like the PATH environment variable.\n" "TO_NATIVE_PATH works just like TO_CMAKE_PATH, but will convert from " " a cmake style path into the native path style \\ for windows and / " "for UNIX.\n" diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index a726849..6cdbbf2 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -57,7 +57,13 @@ void cmFindLibraryCommand::GenerateDocumentation() "the full path to the framework <fullPath>/A.framework. " "When a full path to a framework is used as a library, " "CMake will use a -framework A, and a -F<fullPath> to " - "link the framework to the target. "; + "link the framework to the target." + "\n" + "If the global property FIND_LIBRARY_USE_LIB64_PATHS is set all search " + "paths will be tested as normal, with \"64/\" appended, and with all " + "matches of \"lib/\" replaced with \"lib64/\". This property is " + "automatically set for the platforms that are known to need it if at " + "least one of the languages supported by the PROJECT command is enabled."; } // cmFindLibraryCommand diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 7979928..42dd428 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -30,6 +30,7 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t): Target(t) //---------------------------------------------------------------------------- void cmGeneratorTarget::ClassifySources() { + cmsys::RegularExpression header(CM_HEADER_REGEX); bool isObjLib = this->Target->GetType() == cmTarget::OBJECT_LIBRARY; std::vector<cmSourceFile*> badObjLib; std::vector<cmSourceFile*> const& sources = this->Target->GetSourceFiles(); @@ -58,6 +59,10 @@ void cmGeneratorTarget::ClassifySources() this->ExternalObjects.push_back(sf); if(isObjLib) { badObjLib.push_back(sf); } } + else if(sf->GetLanguage()) + { + this->ObjectSources.push_back(sf); + } else if(ext == "def") { this->ModuleDefinitionFile = sf->GetFullPath(); @@ -68,6 +73,10 @@ void cmGeneratorTarget::ClassifySources() this->IDLSources.push_back(sf); if(isObjLib) { badObjLib.push_back(sf); } } + else if(header.find(sf->GetFullPath().c_str())) + { + this->HeaderSources.push_back(sf); + } else if(this->GlobalGenerator->IgnoreFile(sf->GetExtension().c_str())) { // We only get here if a source file is not an external object @@ -75,10 +84,6 @@ void cmGeneratorTarget::ClassifySources() // No message or diagnosis should be given. this->ExtraSources.push_back(sf); } - else if(sf->GetLanguage()) - { - this->ObjectSources.push_back(sf); - } else { this->ExtraSources.push_back(sf); diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 7da4f86..2a918c9 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -95,6 +95,16 @@ void cmGlobalVisualStudioGenerator::Generate() // of Visual Studio. this->ConfigureCMakeVisualStudioMacros(); + // Add CMakeLists.txt with custom command to rerun CMake. + for(std::vector<cmLocalGenerator*>::const_iterator + lgi = this->LocalGenerators.begin(); + lgi != this->LocalGenerators.end(); ++lgi) + { + cmLocalVisualStudioGenerator* lg = + static_cast<cmLocalVisualStudioGenerator*>(*lgi); + lg->AddCMakeListsRules(); + } + // Run all the local generators. this->cmGlobalGenerator::Generate(); } diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx index 8b22705..bf0e997 100644 --- a/Source/cmLocalVisualStudio10Generator.cxx +++ b/Source/cmLocalVisualStudio10Generator.cxx @@ -74,24 +74,6 @@ void cmLocalVisualStudio10Generator::Generate() { cmTargets &tgts = this->Makefile->GetTargets(); - // Create the regeneration custom rule. - if(!this->Makefile->IsOn("CMAKE_SUPPRESS_REGENERATION")) - { - // Create a rule to regenerate the build system when the target - // specification source changes. - if(cmSourceFile* sf = this->CreateVCProjBuildRule()) - { - // Add the rule to targets that need it. - for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l) - { - if(l->first != CMAKE_CHECK_BUILD_SYSTEM_TARGET) - { - l->second.AddSourceFile(sf); - } - } - } - } - for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l) { if(static_cast<cmGlobalVisualStudioGenerator*>(this->GlobalGenerator) diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index 5b99dfd..99a4c95 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -85,6 +85,23 @@ void cmLocalVisualStudio6Generator::AddHelperCommands() this->CreateCustomTargetsAndCommands(lang); } +void cmLocalVisualStudio6Generator::AddCMakeListsRules() +{ + cmTargets &tgts = this->Makefile->GetTargets(); + for(cmTargets::iterator l = tgts.begin(); + l != tgts.end(); l++) + { + // Add a rule to regenerate the build system when the target + // specification source changes. + const char* suppRegenRule = + this->Makefile->GetDefinition("CMAKE_SUPPRESS_REGENERATION"); + if (!cmSystemTools::IsOn(suppRegenRule)) + { + this->AddDSPBuildRule(l->second); + } + } +} + void cmLocalVisualStudio6Generator::Generate() { this->OutputDSPFile(); @@ -107,18 +124,6 @@ void cmLocalVisualStudio6Generator::OutputDSPFile() // Create the DSP or set of DSP's for libraries and executables cmTargets &tgts = this->Makefile->GetTargets(); - for(cmTargets::iterator l = tgts.begin(); - l != tgts.end(); l++) - { - // Add a rule to regenerate the build system when the target - // specification source changes. - const char* suppRegenRule = - this->Makefile->GetDefinition("CMAKE_SUPPRESS_REGENERATION"); - if (!cmSystemTools::IsOn(suppRegenRule)) - { - this->AddDSPBuildRule(l->second); - } - } // build any targets for(cmTargets::iterator l = tgts.begin(); diff --git a/Source/cmLocalVisualStudio6Generator.h b/Source/cmLocalVisualStudio6Generator.h index a680633..1decc35 100644 --- a/Source/cmLocalVisualStudio6Generator.h +++ b/Source/cmLocalVisualStudio6Generator.h @@ -34,6 +34,7 @@ public: virtual ~cmLocalVisualStudio6Generator(); virtual void AddHelperCommands(); + virtual void AddCMakeListsRules(); /** * Generate the makefile for this directory. diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 363d370..9faf46d 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -100,6 +100,28 @@ void cmLocalVisualStudio7Generator::Generate() this->WriteStampFiles(); } +void cmLocalVisualStudio7Generator::AddCMakeListsRules() +{ + cmTargets &tgts = this->Makefile->GetTargets(); + // Create the regeneration custom rule. + if(!this->Makefile->IsOn("CMAKE_SUPPRESS_REGENERATION")) + { + // Create a rule to regenerate the build system when the target + // specification source changes. + if(cmSourceFile* sf = this->CreateVCProjBuildRule()) + { + // Add the rule to targets that need it. + for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l) + { + if(l->first != CMAKE_CHECK_BUILD_SYSTEM_TARGET) + { + l->second.AddSourceFile(sf); + } + } + } + } +} + void cmLocalVisualStudio7Generator::FixGlobalTargets() { // Visual Studio .NET 2003 Service Pack 1 will not run post-build @@ -156,24 +178,6 @@ void cmLocalVisualStudio7Generator::WriteProjectFiles() // Get the set of targets in this directory. cmTargets &tgts = this->Makefile->GetTargets(); - // Create the regeneration custom rule. - if(!this->Makefile->IsOn("CMAKE_SUPPRESS_REGENERATION")) - { - // Create a rule to regenerate the build system when the target - // specification source changes. - if(cmSourceFile* sf = this->CreateVCProjBuildRule()) - { - // Add the rule to targets that need it. - for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l) - { - if(l->first != CMAKE_CHECK_BUILD_SYSTEM_TARGET) - { - l->second.AddSourceFile(sf); - } - } - } - } - // Create the project file for each target. for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++) diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h index 9d3a9f2..9aa408e 100644 --- a/Source/cmLocalVisualStudio7Generator.h +++ b/Source/cmLocalVisualStudio7Generator.h @@ -64,6 +64,7 @@ public: virtual void ReadAndStoreExternalGUID(const char* name, const char* path); + virtual void AddCMakeListsRules(); protected: void CreateSingleVCProj(const char *lname, cmTarget &tgt); private: diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h index 410cc9a..9968592 100644 --- a/Source/cmLocalVisualStudioGenerator.h +++ b/Source/cmLocalVisualStudioGenerator.h @@ -58,6 +58,8 @@ public: virtual std::string ComputeLongestObjectDirectory(cmTarget&) const = 0; + virtual void AddCMakeListsRules() = 0; + protected: virtual const char* ReportErrorLabel() const; virtual bool CustomCommandUseLocal() const { return false; } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 56e3305..e7e5eda 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -778,8 +778,7 @@ void cmMakefile::SetLocalGenerator(cmLocalGenerator* lg) ("Source Files", "\\.(C|M|c|c\\+\\+|cc|cpp|cxx|f|f90|for|fpp" "|ftn|m|mm|rc|def|r|odl|idl|hpj|bat)$"); - this->AddSourceGroup("Header Files", - "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$"); + this->AddSourceGroup("Header Files", CM_HEADER_REGEX); this->AddSourceGroup("CMake Rules", "\\.rule$"); this->AddSourceGroup("Resources", "\\.plist$"); this->AddSourceGroup("Object Files", "\\.(lo|o|obj)$"); diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx index 8b899bc..ca27530 100644 --- a/Source/cmQtAutomoc.cxx +++ b/Source/cmQtAutomoc.cxx @@ -20,6 +20,9 @@ #include <cmsys/Terminal.h> #include <string.h> +#if defined(__APPLE__) +#include <unistd.h> +#endif #include "cmQtAutomoc.h" diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h index 55147e1..ae01274 100644 --- a/Source/cmSourceFile.h +++ b/Source/cmSourceFile.h @@ -116,4 +116,7 @@ private: std::vector<std::string> Depends; }; +// TODO: Factor out into platform information modules. +#define CM_HEADER_REGEX "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$" + #endif diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index 61d6f1d..9c61588 100644 --- a/Source/kwsys/kwsysDateStamp.cmake +++ b/Source/kwsys/kwsysDateStamp.cmake @@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2012) SET(KWSYS_DATE_STAMP_MONTH 04) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 02) +SET(KWSYS_DATE_STAMP_DAY 03) |