This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, master has been updated via 8ebd590b211c26ea9a35a33d6f019e1909e0283c (commit) via f2cab9855bf5a041379e3a5bbdd26ca3ddeab87a (commit) via 8cfd52981d70bb0219fb23118b35a50faf320022 (commit) via 9b3c5ccf1200e237c0bad3336235b9dde289f016 (commit) via 1df3875871af9aa3f144ab065479b98e255aca5a (commit) via 187332b2fa169056a2c3682d9a7628d872b2d49b (commit) via a17ef5748abc8ef5d3117b5c6c8138ef1cdc9719 (commit) via 53640a4610a650f59aa88240789737f873523fe0 (commit) from e1c92163d3231f10100b4246c938957ad09e1951 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8ebd590b211c26ea9a35a33d6f019e1909e0283c commit 8ebd590b211c26ea9a35a33d6f019e1909e0283c Merge: f2cab98 a17ef57 Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Aug 15 17:19:43 2017 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Aug 15 13:19:53 2017 -0400 Merge topic 'cpack-deb-ipk' a17ef574 CPackDeb: Loosen filename requirement to allow for .ipk Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !1093 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f2cab9855bf5a041379e3a5bbdd26ca3ddeab87a commit f2cab9855bf5a041379e3a5bbdd26ca3ddeab87a Merge: 8cfd529 9b3c5cc Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Aug 15 17:17:40 2017 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Aug 15 13:17:49 2017 -0400 Merge topic 'server-allow-cache' 9b3c5ccf Server: test cache after reconnect 1df38758 cmServerProtocol: allow 'cache' request before 'configure' 187332b2 cmServerProtocol: fix test of empty values Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !977 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8cfd52981d70bb0219fb23118b35a50faf320022 commit 8cfd52981d70bb0219fb23118b35a50faf320022 Merge: e1c9216 53640a4 Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Aug 15 17:16:32 2017 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Aug 15 13:16:35 2017 -0400 Merge topic 'autogen-less-verbose' 53640a46 Autogen: Only print Qt Autogenerator messages when verbose Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !1133 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9b3c5ccf1200e237c0bad3336235b9dde289f016 commit 9b3c5ccf1200e237c0bad3336235b9dde289f016 Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Wed Jun 21 21:26:09 2017 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sun Aug 13 23:20:11 2017 +0200 Server: test cache after reconnect diff --git a/Tests/Server/CMakeLists.txt b/Tests/Server/CMakeLists.txt index e7eaa8d..2ad05c3 100644 --- a/Tests/Server/CMakeLists.txt +++ b/Tests/Server/CMakeLists.txt @@ -20,6 +20,7 @@ macro(do_test bsname file) endif() endmacro() +do_test("test_cache" "tc_cache.json") do_test("test_handshake" "tc_handshake.json") do_test("test_globalSettings" "tc_globalSettings.json") do_test("test_buildsystem1" "tc_buildsystem1.json") diff --git a/Tests/Server/cmakelib.py b/Tests/Server/cmakelib.py index 78450d5..2218e02 100644 --- a/Tests/Server/cmakelib.py +++ b/Tests/Server/cmakelib.py @@ -95,6 +95,21 @@ def initProc(cmakeCommand): return cmakeCommand +def exitProc(cmakeCommand): + # Tell the server to exit. + cmakeCommand.stdin.close() + cmakeCommand.stdout.close() + + # Wait for the server to exit. + # If this version of python supports it, terminate the server after a timeout. + try: + cmakeCommand.wait(timeout=5) + except TypeError: + cmakeCommand.wait() + except: + cmakeCommand.terminate() + raise + def waitForMessage(cmakeCommand, expected): data = ordered(expected) packet = ordered(waitForRawMessage(cmakeCommand)) @@ -197,3 +212,27 @@ def validateGlobalSettings(cmakeCommand, cmakeCommandPath, data): print("Validating", i) if (packet[i] != data[i]): sys.exit(1) + +def validateCache(cmakeCommand, data): + packet = waitForReply(cmakeCommand, 'cache', '', False) + + cache = packet['cache'] + + if (data['isEmpty']): + if (cache != []): + print('Expected empty cache, but got data.\n') + sys.exit(1) + return; + + if (cache == []): + print('Expected cache contents, but got none.\n') + sys.exit(1) + + hadHomeDir = False + for value in cache: + if (value['key'] == 'CMAKE_HOME_DIRECTORY'): + hadHomeDir = True + + if (not hadHomeDir): + print('No CMAKE_HOME_DIRECTORY found in cache.') + sys.exit(1) diff --git a/Tests/Server/server-test.py b/Tests/Server/server-test.py index 5621111..f5a3f28 100644 --- a/Tests/Server/server-test.py +++ b/Tests/Server/server-test.py @@ -84,7 +84,7 @@ for obj in testData: if 'extraGenerator' in data: extraGenerator = data['extraGenerator'] if not os.path.isabs(buildDirectory): buildDirectory = buildDir + "/" + buildDirectory - if not os.path.isabs(sourceDirectory): + if sourceDirectory != '' and not os.path.isabs(sourceDirectory): sourceDirectory = sourceDir + "/" + sourceDirectory cmakelib.handshake(proc, major, minor, sourceDirectory, buildDirectory, generator, extraGenerator) @@ -95,26 +95,20 @@ for obj in testData: if not 'generator' in data: data['generator'] = cmakeGenerator if not 'extraGenerator' in data: data['extraGenerator'] = '' cmakelib.validateGlobalSettings(proc, cmakeCommand, data) + elif 'validateCache' in obj: + data = obj['validateCache'] + if not 'isEmpty' in data: data['isEmpty'] = false + cmakelib.validateCache(proc, data) elif 'message' in obj: print("MESSAGE:", obj["message"]) + elif 'reconnect' in obj: + cmakelib.exitProc(proc) + proc = cmakelib.initProc(cmakeCommand) else: print("Unknown command:", json.dumps(obj)) sys.exit(2) print("Completed") -# Tell the server to exit. -proc.stdin.close() -proc.stdout.close() - -# Wait for the server to exit. -# If this version of python supports it, terminate the server after a timeout. -try: - proc.wait(timeout=5) -except TypeError: - proc.wait() -except: - proc.terminate() - raise - +cmakelib.exitProc(proc) sys.exit(proc.returncode) diff --git a/Tests/Server/tc_cache.json b/Tests/Server/tc_cache.json new file mode 100644 index 0000000..74af6d9 --- /dev/null +++ b/Tests/Server/tc_cache.json @@ -0,0 +1,24 @@ +[ +{ "message": "Testing cache" }, + +{ "message": "Cache after first handshake is empty:" }, +{ "handshake": {"major": 1, "sourceDirectory": "buildsystem1", "buildDirectory": "buildsystem1"} }, +{ "send": { "type": "cache" } }, +{ "validateCache": { "isEmpty": true } }, + +{ "message": "Cache after configure is populated:" }, +{ "send": { "type": "configure" } }, +{ "reply": { "type": "configure", "skipProgress":true } }, +{ "send": { "type": "cache" } }, +{ "validateCache": { "isEmpty": false } }, + +{ "message": "Handshake for existing cache requires buildDirectory only:" }, +{ "reconnect": {} }, +{ "handshake": {"major": 1, "sourceDirectory": "", "buildDirectory": "buildsystem1"} }, + +{ "message": "Cache after reconnect is again populated:" }, +{ "send": { "type": "cache" } }, +{ "validateCache": { "isEmpty": false } }, + +{ "message": "Everything ok." } +] diff --git a/Tests/Server/tc_handshake.json b/Tests/Server/tc_handshake.json index 975bb3d..4bb7fa7 100644 --- a/Tests/Server/tc_handshake.json +++ b/Tests/Server/tc_handshake.json @@ -11,6 +11,10 @@ { "send": {"test": "sometext","cookie":"monster"} }, { "recv": {"cookie":"monster","errorMessage":"No type given in request.","inReplyTo":"","type":"error"} }, +{ "message": "Testing commands before handshake" }, +{ "send": {"type": "cache","cookie":"monster"} }, +{ "recv": {"cookie":"monster","errorMessage":"Waiting for type \"handshake\".","inReplyTo":"cache","type":"error"} }, + { "message": "Testing handshake" }, { "send": {"type": "sometype","cookie":"monster2"} }, { "recv": {"cookie":"monster2","errorMessage":"Waiting for type \"handshake\".","inReplyTo":"sometype","type":"error"} }, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1df3875871af9aa3f144ab065479b98e255aca5a commit 1df3875871af9aa3f144ab065479b98e255aca5a Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Jun 17 13:37:10 2017 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sun Aug 13 22:02:31 2017 +0200 cmServerProtocol: allow 'cache' request before 'configure' Fixes: #16989 diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst index 6c0e6aa..c56e5a7 100644 --- a/Help/manual/cmake-server.7.rst +++ b/Help/manual/cmake-server.7.rst @@ -666,8 +666,7 @@ and will not survive the build directory getting cleaned out. Type "cache" ^^^^^^^^^^^^ -The "cache" request can be used once a project is configured and will -list the cached configuration values. +The "cache" request will list the cached configuration values. Example:: diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 606535f..b371e9e 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -490,10 +490,6 @@ bool cmServerProtocol1::IsExperimental() const cmServerResponse cmServerProtocol1::ProcessCache( const cmServerRequest& request) { - if (this->m_State < STATE_CONFIGURED) { - return request.ReportError("This project was not configured yet."); - } - cmState* state = this->CMakeInstance()->GetState(); Json::Value result = Json::objectValue; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=187332b2fa169056a2c3682d9a7628d872b2d49b commit 187332b2fa169056a2c3682d9a7628d872b2d49b Author: Daniel Pfeifer <dan...@pfeifer-mail.de> AuthorDate: Sat Jun 17 12:22:53 2017 +0200 Commit: Daniel Pfeifer <dan...@pfeifer-mail.de> CommitDate: Sun Aug 13 22:02:30 2017 +0200 cmServerProtocol: fix test of empty values If a required value is in the cache, it is not necessary to set it explicitly. Fixes: #16948, #16988 diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst index f6d3032..6c0e6aa 100644 --- a/Help/manual/cmake-server.7.rst +++ b/Help/manual/cmake-server.7.rst @@ -277,7 +277,9 @@ Giving the "major" version of the requested protocol version will make the serve use the latest minor version of that protocol. Use this if you do not explicitly need to depend on a specific minor version. -Each protocol version may request additional attributes to be present. +If the build directory already contains a CMake cache, it is sufficient to set +the "buildDirectory" attribute. To create a fresh build directory, additional +attributes are required depending on the protocol version. Protocol version 1.0 requires the following attributes to be set: diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 7a841a8..606535f 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -269,6 +269,10 @@ static bool testHomeDirectory(cmState* state, std::string& value, { const std::string cachedValue = std::string(state->GetCacheEntryValue("CMAKE_HOME_DIRECTORY")); + if (value.empty()) { + value = cachedValue; + return true; + } const std::string suffix = "/CMakeLists.txt"; const std::string cachedValueCML = cachedValue + suffix; const std::string valueCML = value + suffix; @@ -279,9 +283,6 @@ static bool testHomeDirectory(cmState* state, std::string& value, "source directory value.")); return false; } - if (value.empty()) { - value = cachedValue; - } return true; } @@ -292,15 +293,15 @@ static bool testValue(cmState* state, const std::string& key, const char* entry = state->GetCacheEntryValue(key); const std::string cachedValue = entry == nullptr ? std::string() : std::string(entry); - if (!cachedValue.empty() && !value.empty() && cachedValue != value) { + if (value.empty()) { + value = cachedValue; + } + if (!cachedValue.empty() && cachedValue != value) { setErrorMessage(errorMessage, std::string("\"") + key + "\" is set but incompatible with configured " + keyDescription + " value."); return false; } - if (value.empty()) { - value = cachedValue; - } return true; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a17ef5748abc8ef5d3117b5c6c8138ef1cdc9719 commit a17ef5748abc8ef5d3117b5c6c8138ef1cdc9719 Author: Nils Gladitz <n.glad...@abberior-instruments.com> AuthorDate: Wed Aug 2 16:03:01 2017 +0200 Commit: Nils Gladitz <nilsglad...@gmail.com> CommitDate: Sat Aug 12 17:27:06 2017 +0200 CPackDeb: Loosen filename requirement to allow for .ipk The OPKG packaging system uses deb like package files with an .ipk extension. Allow the DEB generator to be used in that context. diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index daba7d5..85d564e 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -73,7 +73,8 @@ # # <PackageName>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb # -# Alternatively provided package file name must end with ``.deb`` suffix. +# Alternatively provided package file name must end +# with either ``.deb`` or ``.ipk`` suffix. # # .. note:: # @@ -977,9 +978,9 @@ function(cpack_deb_prepare_package_vars) else() cmake_policy(PUSH) cmake_policy(SET CMP0010 NEW) - if(NOT CPACK_DEBIAN_FILE_NAME MATCHES ".*\\.deb") + if(NOT CPACK_DEBIAN_FILE_NAME MATCHES ".*\\.(deb|ipk)") cmake_policy(POP) - message(FATAL_ERROR "'${CPACK_DEBIAN_FILE_NAME}' is not a valid DEB package file name as it must end with '.deb'!") + message(FATAL_ERROR "'${CPACK_DEBIAN_FILE_NAME}' is not a valid DEB package file name as it must end with '.deb' or '.ipk'!") endif() cmake_policy(POP) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=53640a4610a650f59aa88240789737f873523fe0 commit 53640a4610a650f59aa88240789737f873523fe0 Author: Matthias Kuhn <matth...@opengis.ch> AuthorDate: Fri Aug 11 19:33:18 2017 +0200 Commit: Matthias Kuhn <matth...@opengis.ch> CommitDate: Sat Aug 12 09:29:36 2017 +0200 Autogen: Only print Qt Autogenerator messages when verbose Unconditionally printing these messages prevents ninja builds from filtering successful commands and only show errors and warnings. Fix #17157 diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 6ea1c72..bdddfc2 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1255,7 +1255,9 @@ bool cmQtAutoGenerators::MocGenerateAll( if (!this->MocPredefsCmd.empty()) { if (this->MocSettingsChanged || FileAbsentOrOlder(this->MocPredefsFileAbs, this->SettingsFile)) { - this->LogBold("Generating MOC predefs " + this->MocPredefsFileRel); + if (this->Verbose) { + this->LogBold("Generating MOC predefs " + this->MocPredefsFileRel); + } std::string output; { @@ -1342,7 +1344,9 @@ bool cmQtAutoGenerators::MocGenerateAll( if (this->FileDiffers(this->MocCompFileAbs, automocSource)) { // Actually write mocs compilation file - this->LogBold("Generating MOC compilation " + this->MocCompFileRel); + if (this->Verbose) { + this->LogBold("Generating MOC compilation " + this->MocCompFileRel); + } if (!this->FileWrite("AutoMoc", this->MocCompFileAbs, automocSource)) { return false; } @@ -1393,7 +1397,9 @@ bool cmQtAutoGenerators::MocGenerateFile( } if (generateMoc) { // Log - this->LogBold("Generating MOC source " + mocFileRel); + if (this->Verbose) { + this->LogBold("Generating MOC source " + mocFileRel); + } // Make sure the parent directory exists if (this->MakeParentDirectory("AutoMoc", mocFileAbs)) { @@ -1569,7 +1575,9 @@ bool cmQtAutoGenerators::UicGenerateFile(const std::string& realName, } if (generateUic) { // Log - this->LogBold("Generating UIC header " + uicFileRel); + if (this->Verbose) { + this->LogBold("Generating UIC header " + uicFileRel); + } // Make sure the parent directory exists if (this->MakeParentDirectory("AutoUic", uicFileAbs)) { @@ -1714,7 +1722,9 @@ bool cmQtAutoGenerators::RccGenerateFile(const std::string& rccInputFile, // Regenerate on demand if (generateRcc) { // Log - this->LogBold("Generating RCC source " + rccOutputFile); + if (this->Verbose) { + this->LogBold("Generating RCC source " + rccOutputFile); + } // Make sure the parent directory exists if (this->MakeParentDirectory("AutoRcc", rccBuildFile)) { @@ -1785,7 +1795,9 @@ bool cmQtAutoGenerators::RccGenerateFile(const std::string& rccInputFile, // Write content to file if (this->FileDiffers(wrapperFileAbs, content)) { // Write new wrapper file if the content differs - this->LogBold("Generating RCC wrapper " + wrapperFileRel); + if (this->Verbose) { + this->LogBold("Generating RCC wrapper " + wrapperFileRel); + } if (!this->FileWrite("AutoRcc", wrapperFileAbs, content)) { // Error rccGenerated = false; ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-server.7.rst | 7 ++++--- Modules/CPackDeb.cmake | 7 ++++--- Source/cmQtAutoGenerators.cxx | 24 ++++++++++++++++++------ Source/cmServerProtocol.cxx | 19 ++++++++----------- Tests/Server/CMakeLists.txt | 1 + Tests/Server/cmakelib.py | 39 +++++++++++++++++++++++++++++++++++++++ Tests/Server/server-test.py | 24 +++++++++--------------- Tests/Server/tc_cache.json | 24 ++++++++++++++++++++++++ Tests/Server/tc_handshake.json | 4 ++++ 9 files changed, 111 insertions(+), 38 deletions(-) create mode 100644 Tests/Server/tc_cache.json hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits