diff options
40 files changed, 210 insertions, 282 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e61621d..1250a94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -382,10 +382,8 @@ macro (CMAKE_BUILD_UTILITIES) #--------------------------------------------------------------------- # Build jsoncpp library. if(CMAKE_USE_SYSTEM_JSONCPP) - if(EXISTS ${CMAKE_ROOT}/Modules/FindJsonCpp.cmake) - find_package(JsonCpp) - elseif(NOT CMAKE_VERSION VERSION_LESS 3.0) - include(${CMake_SOURCE_DIR}/Modules/FindJsonCpp.cmake) + if(NOT CMAKE_VERSION VERSION_LESS 3.0) + include(${CMake_SOURCE_DIR}/Source/Modules/FindJsonCpp.cmake) else() message(FATAL_ERROR "CMAKE_USE_SYSTEM_JSONCPP requires CMake >= 3.0") endif() diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index 76058f9..2b26cc9 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -127,7 +127,6 @@ All Modules /module/FindJava /module/FindJNI /module/FindJPEG - /module/FindJsonCpp /module/FindKDE3 /module/FindKDE4 /module/FindLAPACK diff --git a/Help/module/FindJsonCpp.rst b/Help/module/FindJsonCpp.rst deleted file mode 100644 index ba87ece..0000000 --- a/Help/module/FindJsonCpp.rst +++ /dev/null @@ -1 +0,0 @@ -.. cmake-module:: ../../Modules/FindJsonCpp.cmake diff --git a/Help/release/3.2.rst b/Help/release/3.2.rst index 843d65d..8abb1ca 100644 --- a/Help/release/3.2.rst +++ b/Help/release/3.2.rst @@ -124,9 +124,6 @@ Modules * A :module:`FindIntl` module was introduced to find the Gettext ``libintl`` library. -* A :module:`FindJsonCpp` module was introduced to find the - JsonCpp package. - * The :module:`FindLATEX` module learned to support components. * The :module:`FindMPI` module learned to find MS-MPI on Windows. diff --git a/Help/release/dev/rpm_package_architecture.rst b/Help/release/dev/rpm_package_architecture.rst new file mode 100644 index 0000000..5bec51d --- /dev/null +++ b/Help/release/dev/rpm_package_architecture.rst @@ -0,0 +1,6 @@ +rpm_package_architecture +------------------------ + +* The :module:`CPackRPM` module learned a new + :variable:`CPACK_RPM_<component>_PACKAGE_ARCHITECTURE` variable + to specify a component-specific package architecture. diff --git a/Modules/CMakeGraphVizOptions.cmake b/Modules/CMakeGraphVizOptions.cmake index 64c89b9..ff18267 100644 --- a/Modules/CMakeGraphVizOptions.cmake +++ b/Modules/CMakeGraphVizOptions.cmake @@ -10,7 +10,7 @@ # CMake # can generate graphviz files, showing the dependencies between the # targets in a project and also external libraries which are linked -# against. When CMake is run with the --graphiz=foo option, it will +# against. When CMake is run with the --graphviz=foo option, it will # produce # # * a foo.dot file showing all dependencies in the project diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 7516393..6ce18bf 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -51,11 +51,12 @@ # * Default : CPACK_PACKAGE_VERSION # # .. variable:: CPACK_RPM_PACKAGE_ARCHITECTURE +# CPACK_RPM_<component>_PACKAGE_ARCHITECTURE # # The RPM package architecture. # -# * Mandatory : NO -# * Default : - +# * Mandatory : YES +# * Default : Native architecture output by "uname -m" # # This may be set to "noarch" if you know you are building a noarch package. # @@ -619,12 +620,30 @@ endif() # RPM "Version" from RPM "Release" string(REPLACE "-" "_" CPACK_RPM_PACKAGE_VERSION ${CPACK_RPM_PACKAGE_VERSION}) -# CPACK_RPM_PACKAGE_ARCHITECTURE (optional) -if(CPACK_RPM_PACKAGE_ARCHITECTURE) - set(TMP_RPM_BUILDARCH "Buildarch: ${CPACK_RPM_PACKAGE_ARCHITECTURE}") +# CPACK_RPM_PACKAGE_ARCHITECTURE (mandatory) +if(NOT CPACK_RPM_PACKAGE_ARCHITECTURE) + execute_process(COMMAND uname "-m" + OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE + OUTPUT_STRIP_TRAILING_WHITESPACE) +else() if(CPACK_RPM_PACKAGE_DEBUG) message("CPackRPM:Debug: using user-specified build arch = ${CPACK_RPM_PACKAGE_ARCHITECTURE}") endif() +endif() + +set(_CPACK_RPM_PACKAGE_ARCHITECTURE ${CPACK_RPM_PACKAGE_ARCHITECTURE}) + +#prefer component architecture +if(CPACK_RPM_PACKAGE_COMPONENT) + if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_ARCHITECTURE) + set(_CPACK_RPM_PACKAGE_ARCHITECTURE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_ARCHITECTURE}) + if(CPACK_RPM_PACKAGE_DEBUG) + message("CPackRPM:Debug: using component build arch = ${_CPACK_RPM_PACKAGE_ARCHITECTURE}") + endif() + endif() +endif() +if(${_CPACK_RPM_PACKAGE_ARCHITECTURE} STREQUAL "noarch") + set(TMP_RPM_BUILDARCH "Buildarch: ${_CPACK_RPM_PACKAGE_ARCHITECTURE}") else() set(TMP_RPM_BUILDARCH "") endif() @@ -934,7 +953,7 @@ file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SOURCES) file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SPECS) file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SRPMS) -#set(CPACK_RPM_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}-${CPACK_RPM_PACKAGE_ARCHITECTURE}.rpm") +#set(CPACK_RPM_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}-${_CPACK_RPM_PACKAGE_ARCHITECTURE}.rpm") set(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}") # it seems rpmbuild can't handle spaces in the path # neither escaping (as below) nor putting quotes around the path seem to help @@ -1282,6 +1301,7 @@ if(RPMBUILD_EXECUTABLE) COMMAND "${RPMBUILD_EXECUTABLE}" -bb --define "_topdir ${CPACK_RPM_DIRECTORY}" --buildroot "${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" + --target "${_CPACK_RPM_PACKAGE_ARCHITECTURE}" "${CPACK_RPM_BINARY_SPECFILE}" WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" RESULT_VARIABLE CPACK_RPMBUILD_EXEC_RESULT diff --git a/Modules/CheckStructHasMember.cmake b/Modules/CheckStructHasMember.cmake index de31d2c..6c15205 100644 --- a/Modules/CheckStructHasMember.cmake +++ b/Modules/CheckStructHasMember.cmake @@ -69,7 +69,7 @@ macro (CHECK_STRUCT_HAS_MEMBER _STRUCT _MEMBER _HEADER _RESULT) ${_INCLUDE_FILES} int main() { - (void)((${_STRUCT} *)0)->${_MEMBER}; + (void)sizeof(((${_STRUCT} *)0)->${_MEMBER}); return 0; } ") diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake index f94bd09..e236c24 100644 --- a/Modules/FindCurses.cmake +++ b/Modules/FindCurses.cmake @@ -128,8 +128,6 @@ if(CURSES_USE_NCURSES) if(NOT CURSES_NCURSES_HAS_CBREAK) find_library(CURSES_EXTRA_LIBRARY tinfo HINTS "${_cursesLibDir}") find_library(CURSES_EXTRA_LIBRARY tinfo ) - CHECK_LIBRARY_EXISTS("${CURSES_EXTRA_LIBRARY}" - cbreak "" CURSES_TINFO_HAS_CBREAK) endif() else() get_filename_component(_cursesLibDir "${CURSES_CURSES_LIBRARY}" PATH) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 5f5e676..bee5291 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 2) -set(CMake_VERSION_PATCH 20150220) +set(CMake_VERSION_PATCH 20150223) #set(CMake_VERSION_RC 1) diff --git a/Source/CPack/cmCPackBundleGenerator.cxx b/Source/CPack/cmCPackBundleGenerator.cxx index e751568..6e7a26b 100644 --- a/Source/CPack/cmCPackBundleGenerator.cxx +++ b/Source/CPack/cmCPackBundleGenerator.cxx @@ -214,6 +214,7 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir) // codesign the application. if(!cpack_apple_cert_app.empty()) { + std::string output; std::string bundle_path; bundle_path = src_dir + "/"; bundle_path += this->GetOption("CPACK_BUNDLE_NAME"); @@ -240,11 +241,11 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir) temp_sign_file_cmd << bundle_path; temp_sign_file_cmd << it->c_str() << "\""; - if(!this->RunCommand(temp_sign_file_cmd)) + if(!this->RunCommand(temp_sign_file_cmd, &output)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error signing file:" - << bundle_path << it->c_str() << std::endl); + << bundle_path << it->c_str() << std::endl << output << std::endl); return 0; } @@ -256,11 +257,11 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir) temp_sign_binary_cmd << " --deep -f -s \"" << cpack_apple_cert_app; temp_sign_binary_cmd << "\" \"" << bundle_path << "\""; - if(!this->RunCommand(temp_sign_binary_cmd)) + if(!this->RunCommand(temp_sign_binary_cmd, &output)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error signing the application binary." - << std::endl); + << std::endl << output << std::endl); return 0; } @@ -276,11 +277,11 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir) } temp_codesign_cmd << " \"" << bundle_path << "\""; - if(!this->RunCommand(temp_codesign_cmd)) + if(!this->RunCommand(temp_codesign_cmd, &output)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error signing the application package." - << std::endl); + << std::endl << output << std::endl); return 0; } diff --git a/Modules/FindJsonCpp.cmake b/Source/Modules/FindJsonCpp.cmake index cbb4fb3..014d3bd 100644 --- a/Modules/FindJsonCpp.cmake +++ b/Source/Modules/FindJsonCpp.cmake @@ -93,7 +93,7 @@ unset(_JsonCpp_H_REGEX) unset(_JsonCpp_H) #----------------------------------------------------------------------------- -include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/../../Modules/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(JsonCpp FOUND_VAR JsonCpp_FOUND REQUIRED_VARS JsonCpp_LIBRARY JsonCpp_INCLUDE_DIR diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index 8491838..b9bd67b 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -81,6 +81,16 @@ private: const std::string m_test; }; +template<typename FwdIt> +FwdIt cmRotate(FwdIt first, FwdIt middle, FwdIt last) +{ + typename std::iterator_traits<FwdIt>::difference_type dist = + std::distance(middle, last); + std::rotate(first, middle, last); + std::advance(first, dist); + return first; +} + namespace ContainerAlgorithms { template<typename T> @@ -138,20 +148,10 @@ private: const_iterator End; }; -template<typename BiDirIt> -BiDirIt Rotate(BiDirIt first, BiDirIt middle, BiDirIt last) -{ - typename std::iterator_traits<BiDirIt>::difference_type dist = - std::distance(first, middle); - std::rotate(first, middle, last); - std::advance(last, -dist); - return last; -} - template<typename Iter> Iter RemoveN(Iter i1, Iter i2, size_t n) { - return ContainerAlgorithms::Rotate(i1, i1 + n, i2); + return cmRotate(i1, i1 + n, i2); } template<typename Range> @@ -278,4 +278,36 @@ typename Range::const_iterator cmRemoveDuplicates(Range& r) return cmRemoveIndices(r, indices); } +template<typename Range> +std::string cmWrap(std::string prefix, Range const& r, std::string suffix, + std::string sep) +{ + if (r.empty()) + { + return std::string(); + } + return prefix + cmJoin(r, (suffix + sep + prefix).c_str()) + suffix; +} + +template<typename Range> +std::string cmWrap(char prefix, Range const& r, char suffix, std::string sep) +{ + return cmWrap(std::string(1, prefix), r, std::string(1, suffix), sep); +} + +template<typename Range, typename T> +typename Range::const_iterator cmFindNot(Range const& r, T const& t) +{ + return std::find_if(r.begin(), r.end(), + std::bind1st(std::not_equal_to<T>(), t)); +} + +template<typename Range> +ContainerAlgorithms::Range<typename Range::const_reverse_iterator> +cmReverseRange(Range const& range) +{ + return ContainerAlgorithms::Range<typename Range::const_reverse_iterator>( + range.rbegin(), range.rend()); +} + #endif diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index f08b87c..69573ac 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2256,10 +2256,9 @@ int cmCTest::Run(std::vector<std::string> &args, std::string* output) bool SRArgumentSpecified = false; // copy the command line - for(size_t i=0; i < args.size(); ++i) - { - this->InitialCommandLineArguments.push_back(args[i]); - } + this->InitialCommandLineArguments.insert( + this->InitialCommandLineArguments.end(), + args.begin(), args.end()); // process the command line arguments for(size_t i=1; i < args.size(); ++i) diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 45e92ce..0c77891 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -186,11 +186,7 @@ void cmCacheManager::CleanCMakeFiles(const std::string& path) cmsys::Glob globIt; globIt.FindFiles(glob); std::vector<std::string> files = globIt.GetFiles(); - for(std::vector<std::string>::iterator i = files.begin(); - i != files.end(); ++i) - { - cmSystemTools::RemoveFile(*i); - } + std::for_each(files.begin(), files.end(), cmSystemTools::RemoveFile); } bool cmCacheManager::LoadCache(const std::string& path, diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 8652690..be28b2f 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -705,10 +705,7 @@ void cmComputeLinkDepends::DisplayConstraintGraph() { EdgeList const& nl = this->EntryConstraintGraph[i]; e << "item " << i << " is [" << this->EntryList[i].Item << "]\n"; - for(EdgeList::const_iterator j = nl.begin(); j != nl.end(); ++j) - { - e << " item " << *j << " must follow it\n"; - } + e << cmWrap(" item ", nl, " must follow it", "\n") << "\n"; } fprintf(stderr, "%s\n", e.str().c_str()); } diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 8e20c14..e9390e4 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -260,14 +260,10 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv) err << "Unknown extension \"" << ext << "\" for file\n" << " " << *si << "\n" << "try_compile() works only for enabled languages. " - << "Currently these are:\n "; + << "Currently these are:\n "; std::vector<std::string> langs; gg->GetEnabledLanguages(langs); - for(std::vector<std::string>::iterator l = langs.begin(); - l != langs.end(); ++l) - { - err << " " << *l; - } + err << cmJoin(langs, " "); err << "\nSee project() command to enable other languages."; this->Makefile->IssueMessage(cmake::FATAL_ERROR, err.str()); return -1; @@ -373,12 +369,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv) // handle any compile flags we need to pass on if (!compileDefs.empty()) { - fprintf(fout, "add_definitions( "); - for (size_t i = 0; i < compileDefs.size(); ++i) - { - fprintf(fout,"%s ",compileDefs[i].c_str()); - } - fprintf(fout, ")\n"); + fprintf(fout, "add_definitions(%s)\n", cmJoin(compileDefs, " ").c_str()); } /* Use a random file name to avoid rapid creation and deletion @@ -692,11 +683,9 @@ void cmCoreTryCompile::FindOutputFile(const std::string& targetName) std::ostringstream emsg; emsg << "Unable to find the executable at any of:\n"; - for (unsigned int i = 0; i < searchDirs.size(); ++i) - { - emsg << " " << this->BinaryDirectory << searchDirs[i] - << tmpOutputFile << "\n"; - } + emsg << cmWrap(" " + this->BinaryDirectory, + searchDirs, + tmpOutputFile, "\n") << "\n"; this->FindErrorMessage = emsg.str(); return; } diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 4336e1c..ffc641c 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -351,25 +351,12 @@ void cmFindBase::PrintFindStuff() std::cerr << "NoCMakeSystemPath " << this->NoCMakeSystemPath << "\n"; std::cerr << "EnvironmentPath " << this->EnvironmentPath << "\n"; std::cerr << "CMakePathName " << this->CMakePathName << "\n"; - std::cerr << "Names "; - for(unsigned int i =0; i < this->Names.size(); ++i) - { - std::cerr << this->Names[i] << " "; - } - std::cerr << "\n"; + std::cerr << "Names " << cmJoin(this->Names, " ") << "\n"; std::cerr << "\n"; std::cerr << "SearchPathSuffixes "; - for(unsigned int i =0; i < this->SearchPathSuffixes.size(); ++i) - { - std::cerr << this->SearchPathSuffixes[i] << "\n"; - } - std::cerr << "\n"; + std::cerr << cmJoin(this->SearchPathSuffixes, "\n") << "\n"; std::cerr << "SearchPaths\n"; - for(std::vector<std::string>::const_iterator i = this->SearchPaths.begin(); - i != this->SearchPaths.end(); ++i) - { - std::cerr << "[" << *i << "]\n"; - } + std::cerr << cmWrap("[", this->SearchPaths, "]", "\n") << "\n"; } bool cmFindBase::CheckForVariableInCache() diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index fd9b236..26bd4b9 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -329,10 +329,7 @@ bool cmFindPackageCommand { std::ostringstream e; e << "called with components that are both required and optional:\n"; - for(unsigned int i=0; i<doubledComponents.size(); ++i) - { - e << " " << doubledComponents[i] << "\n"; - } + e << cmWrap(" ", doubledComponents, "", "\n") << "\n"; this->SetError(e.str()); return false; } @@ -808,13 +805,8 @@ bool cmFindPackageCommand::HandlePackageMode() { e << "Could not find a package configuration file provided by \"" << this->Name << "\"" << requestedVersionString - << " with any of the following names:\n"; - for(std::vector<std::string>::const_iterator ci = - this->Configs.begin(); - ci != this->Configs.end(); ++ci) - { - e << " " << *ci << "\n"; - } + << " with any of the following names:\n" + << cmWrap(" ", this->Configs, "", "\n") << "\n"; } e << "Add the installation prefix of \"" << this->Name << "\" to " diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index a4d9357..9297688 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -175,11 +175,6 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, // if this is the endfunction for this function then execute if (!this->Depth) { - std::string name = this->Args[0]; - name += "( "; - name += cmJoin(this->Args, " "); - name += " )"; - // create a new command and add it to cmake cmFunctionHelperCommand *f = new cmFunctionHelperCommand(); f->Args = this->Args; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index a4f099b..44c9e9a 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -528,23 +528,22 @@ cmGeneratorTarget::UseObjectLibraries(std::vector<std::string>& objs, std::vector<cmSourceFile const*> objectFiles; this->GetExternalObjects(objectFiles, config); std::vector<cmTarget*> objectLibraries; - std::set<cmTarget*> emitted; for(std::vector<cmSourceFile const*>::const_iterator it = objectFiles.begin(); it != objectFiles.end(); ++it) { std::string objLib = (*it)->GetObjectLibrary(); if (cmTarget* tgt = this->Makefile->FindTargetToUse(objLib)) { - if (emitted.insert(tgt).second) - { - objectLibraries.push_back(tgt); - } + objectLibraries.push_back(tgt); } } + std::vector<cmTarget*>::const_iterator end + = cmRemoveDuplicates(objectLibraries); + for(std::vector<cmTarget*>::const_iterator ti = objectLibraries.begin(); - ti != objectLibraries.end(); ++ti) + ti != end; ++ti) { cmTarget* objLib = *ti; cmGeneratorTarget* ogt = diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx index 84c00ba..fd18596 100644 --- a/Source/cmGetCMakePropertyCommand.cxx +++ b/Source/cmGetCMakePropertyCommand.cxx @@ -39,6 +39,7 @@ bool cmGetCMakePropertyCommand } else if ( args[1] == "MACROS" ) { + output.clear(); this->Makefile->GetListOfMacros(output); } else if ( args[1] == "COMPONENTS" ) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 1de4a59..6147009 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2295,15 +2295,8 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) std::ostringstream ostr; if (!componentsSet->empty()) { - ostr << "Available install components are:"; - std::set<std::string>::iterator it; - for ( - it = componentsSet->begin(); - it != componentsSet->end(); - ++ it ) - { - ostr << " \"" << *it << "\""; - } + ostr << "Available install components are: "; + ostr << cmWrap('"', *componentsSet, '"', " "); } else { @@ -2571,17 +2564,12 @@ bool cmGlobalGenerator::IsReservedTarget(std::string const& name) "test", "RUN_TESTS", "package", "PACKAGE", "package_source", - "ZERO_CHECK", - 0 + "ZERO_CHECK" }; - for(const char** reservedTarget = reservedTargets; - *reservedTarget; ++reservedTarget) - { - if(name == *reservedTarget) return true; - } - - return false; + return std::find(cmArrayBegin(reservedTargets), + cmArrayEnd(reservedTargets), name) + != cmArrayEnd(reservedTargets); } void cmGlobalGenerator::SetExternalMakefileProjectGenerator( @@ -2937,14 +2925,11 @@ void cmGlobalGenerator::WriteSummary(cmTarget* target) { target->GetSourceFiles(sources, *ci); } - std::set<cmSourceFile*> emitted; + std::vector<cmSourceFile*>::const_iterator sourcesEnd + = cmRemoveDuplicates(sources); for(std::vector<cmSourceFile*>::const_iterator si = sources.begin(); - si != sources.end(); ++si) + si != sourcesEnd; ++si) { - if (!emitted.insert(*si).second) - { - continue; - } Json::Value& lj_source = lj_sources.append(Json::objectValue); cmSourceFile* sf = *si; std::string const& sfp = sf->GetFullPath(); @@ -3030,7 +3015,7 @@ void cmGlobalGenerator::AddEvaluationFile(const std::string &inputFile, //---------------------------------------------------------------------------- void cmGlobalGenerator::ProcessEvaluationFiles() { - std::set<std::string> generatedFiles; + std::vector<std::string> generatedFiles; for(std::vector<cmGeneratorExpressionEvaluationFile*>::const_iterator li = this->EvaluationFiles.begin(); li != this->EvaluationFiles.end(); @@ -3042,16 +3027,24 @@ void cmGlobalGenerator::ProcessEvaluationFiles() return; } std::vector<std::string> files = (*li)->GetFiles(); - for(std::vector<std::string>::const_iterator fi = files.begin(); - fi != files.end(); ++fi) + std::sort(files.begin(), files.end()); + + std::vector<std::string> intersection; + std::set_intersection(files.begin(), files.end(), + generatedFiles.begin(), generatedFiles.end(), + std::back_inserter(intersection)); + if (!intersection.empty()) { - if (!generatedFiles.insert(*fi).second) - { - cmSystemTools::Error("File to be generated by multiple different " - "commands: ", fi->c_str()); - return; - } + cmSystemTools::Error("Files to be generated by multiple different " + "commands: ", cmWrap('"', intersection, '"', " ").c_str()); + return; } + + generatedFiles.insert(generatedFiles.end(), + files.begin(), files.end()); + std::vector<std::string>::iterator newIt = + generatedFiles.end() - files.size(); + std::inplace_merge(generatedFiles.begin(), newIt, generatedFiles.end()); } } diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index 3362abb..6dea5c1 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -45,7 +45,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, { this->ScopeDepth++; } - if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endif")) + else if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endif")) { this->ScopeDepth--; // if this is the endif for this if statement, then start executing diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index 0c6adfd..17617aa 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -390,8 +390,7 @@ bool cmListCommand return false; } - std::reverse(varArgsExpanded.begin(), varArgsExpanded.end()); - std::string value = cmJoin(varArgsExpanded, ";"); + std::string value = cmJoin(cmReverseRange(varArgsExpanded), ";"); this->Makefile->AddDefinition(listName, value.c_str()); return true; diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 6a6135b..2accf47 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2800,12 +2800,7 @@ std::string cmLocalGenerator::ConvertToOutputFormat(const std::string& source, } if(this->WindowsShell) { - std::string::size_type pos = 0; - while((pos = result.find('/', pos)) != std::string::npos) - { - result[pos] = '\\'; - pos++; - } + std::replace(result.begin(), result.end(), '/', '\\'); } result = this->EscapeForShell(result, true, false, output == WATCOMQUOTE); } diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index c275e6b..432cb3a 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -724,12 +724,7 @@ cmLocalUnixMakefileGenerator3 } // Write the list of commands. - for(std::vector<std::string>::const_iterator i = commands.begin(); - i != commands.end(); ++i) - { - replace = *i; - os << "\t" << replace << "\n"; - } + os << cmWrap("\t", commands, "", "\n") << "\n"; if(symbolic && !this->WatcomWMake) { os << ".PHONY : " << cmMakeSafe(tgt) << "\n"; @@ -1330,13 +1325,7 @@ cmLocalUnixMakefileGenerator3 this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE")); fout << "\n" << "# Per-language clean rules from dependency scanning.\n" - << "foreach(lang"; - for(std::set<std::string>::const_iterator l = languages.begin(); - l != languages.end(); ++l) - { - fout << " " << *l; - } - fout << ")\n" + << "foreach(lang " << cmJoin(languages, " ") << ")\n" << " include(" << this->GetTargetDirectory(target) << "/cmake_clean_${lang}.cmake OPTIONAL)\n" << "endforeach()\n"; diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 29e8cb1..12c8576 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -224,15 +224,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, // if this is the endmacro for this macro then execute if (!this->Depth) { - std::string name = this->Args[0]; - name += "("; - if (!this->Args.empty()) - { - name += " "; - name += cmJoin(this->Args, " "); - } - name += " )"; - mf.AddMacro(this->Args[0].c_str(), name.c_str()); + mf.AddMacro(this->Args[0].c_str()); // create a new command and add it to cmake cmMacroHelperCommand *f = new cmMacroHelperCommand(); f->Args = this->Args; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index ac5fec9..ccfe2b1 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -143,7 +143,7 @@ cmMakefile::cmMakefile(const cmMakefile& mf): Internal(new Internals) this->LocalGenerator = mf.LocalGenerator; this->FunctionBlockers = mf.FunctionBlockers; - this->MacrosMap = mf.MacrosMap; + this->MacrosList = mf.MacrosList; this->SubDirectoryOrder = mf.SubDirectoryOrder; this->Properties = mf.Properties; this->PreOrder = mf.PreOrder; @@ -213,13 +213,7 @@ cmMakefile::~cmMakefile() void cmMakefile::PrintStringVector(const char* s, const std::vector<std::string>& v) const { - std::cout << s << ": ( \n"; - for(std::vector<std::string>::const_iterator i = v.begin(); - i != v.end(); ++i) - { - std::cout << *i << " "; - } - std::cout << " )\n"; + std::cout << s << ": ( \n" << cmWrap('"', v, '"', " ") << ")\n"; } void cmMakefile @@ -1340,22 +1334,11 @@ void cmMakefile::AddDefineFlag(const char* flag) void cmMakefile::AddDefineFlag(const char* flag, std::string& dflags) { // remove any \n\r - std::string ret = flag; - std::string::size_type pos = 0; - while((pos = ret.find('\n', pos)) != std::string::npos) - { - ret[pos] = ' '; - pos++; - } - pos = 0; - while((pos = ret.find('\r', pos)) != std::string::npos) - { - ret[pos] = ' '; - pos++; - } - - dflags += " "; - dflags += ret; + std::string::size_type initSize = dflags.size(); + dflags += std::string(" ") + flag; + std::string::iterator flagStart = dflags.begin() + initSize + 1; + std::replace(flagStart, dflags.end(), '\n', ' '); + std::replace(flagStart, dflags.end(), '\r', ' '); } @@ -1472,18 +1455,11 @@ bool cmMakefile::ParseDefineFlag(std::string const& def, bool remove) cmSystemTools::ExpandListArgument(cdefs, defs); // Recompose the list without the definition. - std::string ndefs; - const char* sep = ""; - for(std::vector<std::string>::const_iterator di = defs.begin(); - di != defs.end(); ++di) - { - if(*di != define) - { - ndefs += sep; - sep = ";"; - ndefs += *di; - } - } + std::vector<std::string>::const_iterator defEnd = + std::remove(defs.begin(), defs.end(), define); + std::vector<std::string>::const_iterator defBegin = + defs.begin(); + std::string ndefs = cmJoin(cmRange(defBegin, defEnd), ";"); // Store the new list. this->SetProperty("COMPILE_DEFINITIONS", ndefs.c_str()); @@ -3739,26 +3715,16 @@ cmVariableWatch *cmMakefile::GetVariableWatch() const } #endif -void cmMakefile::AddMacro(const char* name, const char* signature) +void cmMakefile::AddMacro(const char* name) { - if ( !name || !signature ) - { - return; - } - this->MacrosMap[name] = signature; + assert(name); + this->MacrosList.push_back(name); } void cmMakefile::GetListOfMacros(std::string& macros) const { - StringStringMap::const_iterator it; - macros = ""; - const char* sep = ""; - for ( it = this->MacrosMap.begin(); it != this->MacrosMap.end(); ++it ) - { - macros += sep; - macros += it->first; - sep = ""; - } + assert(macros.empty()); + macros = cmJoin(this->MacrosList, ";"); } cmCacheManager *cmMakefile::GetCacheManager() const diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 895a2fc..e98f1d9 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -841,7 +841,7 @@ public: * Add a macro to the list of macros. The arguments should be name of the * macro and a documentation signature of it */ - void AddMacro(const char* name, const char* signature); + void AddMacro(const char* name); ///! Add a new cmTest to the list of tests for this makefile. cmTest* CreateTest(const std::string& testName); @@ -1065,8 +1065,7 @@ private: std::stack<int> LoopBlockCounter; - typedef std::map<std::string, std::string> StringStringMap; - StringStringMap MacrosMap; + std::vector<std::string> MacrosList; std::map<std::string, bool> SubDirectoryOrder; diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx index d20d999..cb61ed9 100644 --- a/Source/cmRST.cxx +++ b/Source/cmRST.cxx @@ -463,10 +463,7 @@ void cmRST::UnindentLines(std::vector<std::string>& lines) } // Truncate indentation to match that on this line. - if(line.size() < indentEnd) - { - indentEnd = line.size(); - } + indentEnd = std::min(indentEnd, line.size()); for(std::string::size_type j = 0; j != indentEnd; ++j) { if(line[j] != indentText[j]) @@ -487,19 +484,16 @@ void cmRST::UnindentLines(std::vector<std::string>& lines) } } - // Drop leading blank lines. - size_t leadingEmpty = 0; - for(size_t i = 0; i < lines.size() && lines[i].empty(); ++i) - { - ++leadingEmpty; - } - lines.erase(lines.begin(), lines.begin()+leadingEmpty); + std::vector<std::string>::const_iterator it = lines.begin(); + size_t leadingEmpty = std::distance(it, cmFindNot(lines, std::string())); - // Drop trailing blank lines. - size_t trailingEmpty = 0; - for(size_t i = lines.size(); i > 0 && lines[i-1].empty(); --i) - { - ++trailingEmpty; - } - lines.erase(lines.end()-trailingEmpty, lines.end()); + std::vector<std::string>::const_reverse_iterator rit = lines.rbegin(); + size_t trailingEmpty = std::distance(rit, + cmFindNot(cmReverseRange(lines), std::string())); + + std::vector<std::string>::iterator contentEnd + = cmRotate(lines.begin(), + lines.begin() + leadingEmpty, + lines.end() - trailingEmpty); + lines.erase(contentEnd, lines.end()); } diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index bf496e9..5264123 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -835,7 +835,7 @@ cmSystemTools::PrintSingleCommand(std::vector<std::string> const& command) return std::string(); } - return "\"" + cmJoin(command, "\" \"") + "\""; + return cmWrap('"', command, '"', " "); } bool cmSystemTools::DoesFileExistWithExtensions( diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 1ad0d48..e046bef 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1542,12 +1542,9 @@ void cmTarget::DeleteDependencyForVS6( DependencyMap& depMap, if( map_itr != depMap.end() ) { DependencyList& depList = map_itr->second; - DependencyList::iterator itr; - while( (itr = std::find(depList.begin(), depList.end(), dep)) != - depList.end() ) - { - depList.erase( itr ); - } + DependencyList::iterator begin = + std::remove(depList.begin(), depList.end(), dep); + depList.erase(begin, depList.end()); } } @@ -6875,11 +6872,11 @@ cmTargetInternalPointer //---------------------------------------------------------------------------- cmTargetInternalPointer::~cmTargetInternalPointer() { - deleteAndClear(this->Pointer->IncludeDirectoriesEntries); - deleteAndClear(this->Pointer->CompileOptionsEntries); - deleteAndClear(this->Pointer->CompileFeaturesEntries); - deleteAndClear(this->Pointer->CompileDefinitionsEntries); - deleteAndClear(this->Pointer->SourceEntries); + cmDeleteAll(this->Pointer->IncludeDirectoriesEntries); + cmDeleteAll(this->Pointer->CompileOptionsEntries); + cmDeleteAll(this->Pointer->CompileFeaturesEntries); + cmDeleteAll(this->Pointer->CompileDefinitionsEntries); + cmDeleteAll(this->Pointer->SourceEntries); delete this->Pointer; } diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 6a7dc6e..7d67bd8 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -213,27 +213,14 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) // Echo string else if (args[1] == "echo" ) { - unsigned int cc; - const char* space = ""; - for ( cc = 2; cc < args.size(); cc ++ ) - { - std::cout << space << args[cc]; - space = " "; - } - std::cout << std::endl; + std::cout << cmJoin(cmRange(args).advance(2), " ") << std::endl; return 0; } // Echo string no new line else if (args[1] == "echo_append" ) { - unsigned int cc; - const char* space = ""; - for ( cc = 2; cc < args.size(); cc ++ ) - { - std::cout << space << args[cc]; - space = " "; - } + std::cout << cmJoin(cmRange(args).advance(2), " "); return 0; } @@ -463,9 +450,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) return 1; } - std::string command = "\""; - command += cmJoin(cmRange(args).advance(3), "\" \""); - command += "\""; + std::string command = cmWrap('"', cmRange(args).advance(3), '"', " "); int retval = 0; int timeout = 0; if ( cmSystemTools::RunSingleCommand(command.c_str(), 0, &retval, @@ -1329,12 +1314,7 @@ bool cmcmd::RunCommand(const char* comment, if(verbose) { std::cout << comment << ":\n"; - for(std::vector<std::string>::iterator i = command.begin(); - i != command.end(); ++i) - { - std::cout << *i << " "; - } - std::cout << "\n"; + std::cout << cmJoin(command, " ") << "\n"; } std::string output; int retCode =0; diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index cb45e79..4d3aeaf 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -104,7 +104,7 @@ if(BUILD_TESTING) # Look for rpmbuild to use for tests. # The tool does not work with spaces in the path. - if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES " ") + if(NOT CMAKE_CURRENT_BINARY_DIR MATCHES " ") find_program(RPMBUILD_EXECUTABLE NAMES rpmbuild) else() set(RPMBUILD_EXECUTABLE "RPMBUILD_EXECUTABLE-NOTFOUND") diff --git a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in index de0ee46..4119b8d 100644 --- a/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in +++ b/Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in @@ -11,6 +11,12 @@ if(CPACK_GENERATOR MATCHES "RPM") set(CPACK_RPM_COMPONENT_INSTALL "ON") set(CPACK_RPM_applications_PACKAGE_REQUIRES "mylib-libraries") + # test a "noarch" rpm + set(CPACK_RPM_headers_PACKAGE_ARCHITECTURE "noarch") + + # test cross-built rpm + set(CPACK_RPM_applications_PACKAGE_ARCHITECTURE "armv7hf") + # test package summary override set(CPACK_RPM_PACKAGE_SUMMARY "default summary") set(CPACK_RPM_libraries_PACKAGE_SUMMARY "libraries summary") diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake index 68d846f..5be9d17 100644 --- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake +++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake @@ -161,21 +161,25 @@ if(CPackGen MATCHES "RPM") set(check_file_match_expected_summary ".*${CPACK_RPM_libraries_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*${CPACK_RPM_libraries_PACKAGE_DESCRIPTION}.*") set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") + set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_applications_PACKAGE_ARCHITECTURE}") set(spec_regex "*libraries*") elseif(check_file_headers_match) set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*${CPACK_COMPONENT_HEADERS_DESCRIPTION}.*") set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}") + set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_libraries_PACKAGE_ARCHITECTURE}") set(spec_regex "*headers*") elseif(check_file_applications_match) set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*${CPACK_COMPONENT_APPLICATIONS_DESCRIPTION}.*") set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}") + set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_headers_PACKAGE_ARCHITECTURE}") set(spec_regex "*applications*") elseif(check_file_Unspecified_match) set(check_file_match_expected_summary ".*${CPACK_RPM_PACKAGE_SUMMARY}.*") set(check_file_match_expected_description ".*DESCRIPTION.*") set(check_file_match_expected_relocation_path "Relocations : ${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}") + set(check_file_match_expected_architecture "Architecture: ${CPACK_RPM_Unspecified_PACKAGE_ARCHITECTURE}") set(spec_regex "*Unspecified*") else() message(FATAL_ERROR "error: unexpected rpm package '${check_file}'") @@ -204,6 +208,10 @@ if(CPackGen MATCHES "RPM") message(FATAL_ERROR "error: '${check_file}' rpm package relocation path does not match expected value - regex '${check_file_match_expected_relocation_path}'; RPM output: '${check_file_content}'; generated spec file: '${spec_file_content}'") endif() + string(REGEX MATCH ${check_file_match_expected_architecture} check_file_match_architecture ${check_file_content}) + if (NOT check_file_match_architecture) + message(FATAL_ERROR "error: '${check_file}' Architecture does not match expected value - '${check_file_match_expected_architecture}'; RPM output: '${check_file_content}'; generated spec file: '${spec_file_content}'") + endif() endforeach() elseif(${CPackComponentWay} STREQUAL "IgnoreGroup") endif() diff --git a/Tests/FindJsonCpp/Test/CMakeLists.txt b/Tests/FindJsonCpp/Test/CMakeLists.txt index 4e1e271..d1dc647 100644 --- a/Tests/FindJsonCpp/Test/CMakeLists.txt +++ b/Tests/FindJsonCpp/Test/CMakeLists.txt @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.1) project(TestFindJsonCpp CXX) include(CTest) +# CMake does not actually provide FindJsonCpp publicly. +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../Source/Modules) + find_package(JsonCpp REQUIRED) add_executable(test_jsoncpp_tgt main.cxx) diff --git a/Tests/RunCMake/File_Generate/CommandConflict-stderr.txt b/Tests/RunCMake/File_Generate/CommandConflict-stderr.txt index da97ba4..4fa3f20 100644 --- a/Tests/RunCMake/File_Generate/CommandConflict-stderr.txt +++ b/Tests/RunCMake/File_Generate/CommandConflict-stderr.txt @@ -1 +1 @@ -CMake Error: File to be generated by multiple different commands: .*CommandConflict-build/output_.*.txt +CMake Error: Files to be generated by multiple different commands: ".*CommandConflict-build/output_.*.txt" @@ -401,6 +401,8 @@ Configuration: --no-system-curl use cmake-provided curl library (default) --system-expat use system-installed expat library --no-system-expat use cmake-provided expat library (default) + --system-jsoncpp use system-installed jsoncpp library + --no-system-jsoncpp use cmake-provided jsoncpp library (default) --system-zlib use system-installed zlib library --no-system-zlib use cmake-provided zlib library (default) --system-bzip2 use system-installed bzip2 library @@ -640,10 +642,10 @@ while test $# != 0; do --init=*) cmake_init_file=`cmake_arg "$1"` ;; --system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=1" ;; --no-system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=0" ;; - --system-bzip2|--system-curl|--system-expat|--system-libarchive|--system-zlib) + --system-bzip2|--system-curl|--system-expat|--system-jsoncpp|--system-libarchive|--system-zlib) lib=`cmake_arg "$1" "--system-"` cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=1" ;; - --no-system-bzip2|--no-system-curl|--no-system-expat|--no-system-libarchive|--no-system-zlib) + --no-system-bzip2|--no-system-curl|--no-system-expat|--no-system-jsoncpp|--no-system-libarchive|--no-system-zlib) lib=`cmake_arg "$1" "--no-system-"` cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=0" ;; --qt-gui) cmake_bootstrap_qt_gui="1" ;; |