[Cmake-commits] CMake branch, next, updated. v3.1.0-2236-gb4812c7
Brad King
brad.king at kitware.com
Tue Jan 20 09:31:51 EST 2015
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, next has been updated
via b4812c7c9e03f46b40a0dfbe9000dc87832cb6ed (commit)
via 0238d0c397e52a82f20a0b7bf5aad9a07f36133c (commit)
via bda4f0b661018b32aefdb14887d8137e7a4fd118 (commit)
via a02fbec5f3eabf7847583a7f45c092ef6c066546 (commit)
from ee01a24ede9a83c9f72eb1fbcfb3fbb621078bfe (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b4812c7c9e03f46b40a0dfbe9000dc87832cb6ed
commit b4812c7c9e03f46b40a0dfbe9000dc87832cb6ed
Merge: ee01a24 0238d0c
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 20 09:31:50 2015 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 20 09:31:50 2015 -0500
Merge topic 'cmake-labels-json' into next
0238d0c3 cmake: Generate an internal 'Labels.json' file next to 'Labels.txt'
bda4f0b6 jsoncpp: Add headers to help CMake include in-source jsoncpp headers
a02fbec5 jsoncpp: Drop doxygen comments that cause Clang warnings
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0238d0c397e52a82f20a0b7bf5aad9a07f36133c
commit 0238d0c397e52a82f20a0b7bf5aad9a07f36133c
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Jan 16 15:35:36 2015 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Jan 20 09:31:11 2015 -0500
cmake: Generate an internal 'Labels.json' file next to 'Labels.txt'
In each internal target directory we generate a "Labels.txt" file
containing labels for that target and its sources, but it uses an
internal format. In order to make the list of labels easier to
publish, use a json format and call it "Labels.json".
Since we now use jsoncpp headers, link CMakeLib to the jsoncpp library.
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 96f4709..6b6008d 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -500,7 +500,9 @@ add_library(CMakeLib ${SRCS})
target_link_libraries(CMakeLib cmsys
${CMAKE_EXPAT_LIBRARIES} ${CMAKE_ZLIB_LIBRARIES}
${CMAKE_TAR_LIBRARIES} ${CMAKE_COMPRESS_LIBRARIES}
- ${CMAKE_CURL_LIBRARIES} )
+ ${CMAKE_CURL_LIBRARIES}
+ cmjsoncpp
+ )
# On Apple we need CoreFoundation
if(APPLE)
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 1745d9a..dd3b1ec 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -38,6 +38,8 @@
#if defined(CMAKE_BUILD_WITH_CMAKE)
# include <cmsys/MD5.h>
+# include "cm_jsoncpp_value.h"
+# include "cm_jsoncpp_writer.h"
#endif
#include <stdlib.h> // required for atof
@@ -2911,10 +2913,21 @@ void cmGlobalGenerator::WriteSummary(cmTarget* target)
std::string dir = target->GetSupportDirectory();
std::string file = dir;
file += "/Labels.txt";
+ std::string json_file = dir + "/Labels.json";
+#ifdef CMAKE_BUILD_WITH_CMAKE
// Check whether labels are enabled for this target.
if(const char* value = target->GetProperty("LABELS"))
{
+ Json::Value lj_root(Json::objectValue);
+ Json::Value& lj_target =
+ lj_root["target"] = Json::objectValue;
+ lj_target["name"] = target->GetName();
+ Json::Value& lj_target_labels =
+ lj_target["labels"] = Json::arrayValue;
+ Json::Value& lj_sources =
+ lj_root["sources"] = Json::arrayValue;
+
cmSystemTools::MakeDirectory(dir.c_str());
cmGeneratedFileStream fout(file.c_str());
@@ -2929,6 +2942,7 @@ void cmGlobalGenerator::WriteSummary(cmTarget* target)
li != labels.end(); ++li)
{
fout << " " << *li << "\n";
+ lj_target_labels.append(*li);
}
}
@@ -2954,23 +2968,33 @@ void cmGlobalGenerator::WriteSummary(cmTarget* target)
{
continue;
}
+ Json::Value& lj_source = lj_sources.append(Json::objectValue);
cmSourceFile* sf = *si;
- fout << sf->GetFullPath() << "\n";
+ std::string const& sfp = sf->GetFullPath();
+ fout << sfp << "\n";
+ lj_source["file"] = sfp;
if(const char* svalue = sf->GetProperty("LABELS"))
{
labels.clear();
+ Json::Value& lj_source_labels =
+ lj_source["labels"] = Json::arrayValue;
cmSystemTools::ExpandListArgument(svalue, labels);
for(std::vector<std::string>::const_iterator li = labels.begin();
li != labels.end(); ++li)
{
fout << " " << *li << "\n";
+ lj_source_labels.append(*li);
}
}
}
+ cmGeneratedFileStream json_fout(json_file.c_str());
+ json_fout << lj_root;
}
else
+#endif
{
cmSystemTools::RemoveFile(file);
+ cmSystemTools::RemoveFile(json_file);
}
}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bda4f0b661018b32aefdb14887d8137e7a4fd118
commit bda4f0b661018b32aefdb14887d8137e7a4fd118
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 20 09:28:59 2015 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Jan 20 09:28:59 2015 -0500
jsoncpp: Add headers to help CMake include in-source jsoncpp headers
Add cm_jsoncpp_value.h and cm_jsoncpp_writer.h headers to include the
CMake-provided copy of the json/value.h and json/writer.h headers from
CMake sources.
diff --git a/Utilities/cm_jsoncpp_value.h b/Utilities/cm_jsoncpp_value.h
new file mode 100644
index 0000000..15e1088
--- /dev/null
+++ b/Utilities/cm_jsoncpp_value.h
@@ -0,0 +1,18 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2015 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#ifndef cm_jsoncpp_value_h
+#define cm_jsoncpp_value_h
+
+/* Use the jsoncpp library configured for CMake. */
+#include <cmjsoncpp/include/json/value.h>
+
+#endif
diff --git a/Utilities/cm_jsoncpp_writer.h b/Utilities/cm_jsoncpp_writer.h
new file mode 100644
index 0000000..c410369
--- /dev/null
+++ b/Utilities/cm_jsoncpp_writer.h
@@ -0,0 +1,18 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2015 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#ifndef cm_jsoncpp_writer_h
+#define cm_jsoncpp_writer_h
+
+/* Use the jsoncpp library configured for CMake. */
+#include <cmjsoncpp/include/json/writer.h>
+
+#endif
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a02fbec5f3eabf7847583a7f45c092ef6c066546
commit a02fbec5f3eabf7847583a7f45c092ef6c066546
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 20 09:26:36 2015 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Jan 20 09:28:28 2015 -0500
jsoncpp: Drop doxygen comments that cause Clang warnings
Even though we disable warnings when building jsoncpp itself, including
its headers from other CMake sources may still cause warnings. Update
the code to remove these -Wdocumentation warnings.
diff --git a/Utilities/cmjsoncpp/include/json/reader.h b/Utilities/cmjsoncpp/include/json/reader.h
index 98814d5..95237d1 100644
--- a/Utilities/cmjsoncpp/include/json/reader.h
+++ b/Utilities/cmjsoncpp/include/json/reader.h
@@ -106,9 +106,7 @@ public:
* the parsed document. An empty string is returned if no error
* occurred
* during parsing.
- * \deprecated Use getFormattedErrorMessages() instead (typo fix).
*/
- JSONCPP_DEPRECATED("Use getFormattedErrorMessages instead")
std::string getFormatedErrorMessages() const;
/** \brief Returns a user friendly string that list errors in the parsed
diff --git a/Utilities/cmjsoncpp/include/json/writer.h b/Utilities/cmjsoncpp/include/json/writer.h
index 397bf6a..10863b0 100644
--- a/Utilities/cmjsoncpp/include/json/writer.h
+++ b/Utilities/cmjsoncpp/include/json/writer.h
@@ -150,7 +150,6 @@ private:
* If the Value have comments then they are outputed according to their
#CommentPlacement.
*
- * \param indentation Each level will be indented by this amount extra.
* \sa Reader, Value, Value::setComment()
*/
class JSON_API StyledStreamWriter {
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list