summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMihail Szabolcs <theicebreaker007@gmail.com>2024-02-18 12:09:26 (GMT)
committerMihail Szabolcs <theicebreaker007@gmail.com>2024-02-18 12:38:03 (GMT)
commit9a4f715d2b353492b118d0833bad6e506c4398cd (patch)
treed44f170706a8220d12e6d434f27b34825063e5f7
parenta1ad0fb190d05c1547f3cd5237972259f1df41b1 (diff)
downloadNinja-9a4f715d2b353492b118d0833bad6e506c4398cd.zip
Ninja-9a4f715d2b353492b118d0833bad6e506c4398cd.tar.gz
Ninja-9a4f715d2b353492b118d0833bad6e506c4398cd.tar.bz2
added missing include guards
These changes make it easy to build an amalgamated `ninja.cc` that can be used to bootstrap ninja with just a working C++ compiler, without the need for any third-party tools like `cmake` or `python`. *nix c++ -O2 src/ninja_amalgamated.cc -o ninja osx-cross x86_64-apple-darwin19-c++ -O2 src/one.cc -o ninja mingw x86_64-w64-mingw32-c++ -O2 src/ninja_amalgamated.cc -o ninja.exe msvc cl.exe /nologo /Ox /GR- src\ninja_amalgamated.cc /out:ninja.exe
-rw-r--r--src/includes_normalize.h5
-rw-r--r--src/msvc_helper.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/includes_normalize.h b/src/includes_normalize.h
index 7d50556..8d29a64 100644
--- a/src/includes_normalize.h
+++ b/src/includes_normalize.h
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#ifndef INCLUDES_NORMALIZE_H_
+#define INCLUDES_NORMALIZE_H_
+
#include <string>
#include <vector>
@@ -38,3 +41,5 @@ struct IncludesNormalize {
std::string relative_to_;
std::vector<StringPiece> split_relative_to_;
};
+
+#endif // INCLUDES_NORMALIZE_H_
diff --git a/src/msvc_helper.h b/src/msvc_helper.h
index 568b9f9..699b0a1 100644
--- a/src/msvc_helper.h
+++ b/src/msvc_helper.h
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#ifndef MSVC_HELPER_H_
+#define MSVC_HELPER_H_
+
#include <string>
std::string EscapeForDepfile(const std::string& path);
@@ -30,3 +33,5 @@ struct CLWrapper {
void* env_block_;
};
+
+#endif // MSVC_HELPER_H_