File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 11# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
2- #
2+ #
33# Licensed under the Apache License, Version 2.0 (the "License");
44# you may not use this file except in compliance with the License.
55# You may obtain a copy of the License at
6- #
6+ #
77# http://www.apache.org/licenses/LICENSE-2.0
8- #
8+ #
99# Unless required by applicable law or agreed to in writing, software
1010# distributed under the License is distributed on an "AS IS" BASIS,
1111# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -29,12 +29,13 @@ INCLUDE_DIRECTORIES(${GLOG_INCLUDE_DIR})
2929ExternalProject_Add (
3030 glog
3131 ${EXTERNAL_PROJECT_LOG_ARGS}
32+ DEPENDS gflags
3233 GIT_REPOSITORY "https://github.com/google/glog.git"
3334 PREFIX ${GLOG_SOURCES_DIR}
3435 UPDATE_COMMAND ""
3536 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${GLOG_INSTALL_DIR}
3637 CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON
37- CMAKE_ARGS -DWITH_GFLAGS=OFF
38+ CMAKE_ARGS -DWITH_GFLAGS=ON
3839 CMAKE_ARGS -DBUILD_TESTING=OFF
3940)
4041
Original file line number Diff line number Diff line change @@ -144,20 +144,20 @@ void runInitFunctions() {
144144}
145145
146146void initMain (int argc, char ** argv) {
147- initializeLogging (argc, argv);
148147 installLayerStackTracer ();
149148 std::string line;
150149 for (int i = 0 ; i < argc; ++i) {
151150 line += argv[i];
152151 line += ' ' ;
153152 }
154- LOG (INFO) << " commandline: " << line;
155153
156154#ifndef GFLAGS_GFLAGS_H_
157155 namespace gflags = google;
158156#endif
159157
160158 gflags::ParseCommandLineFlags (&argc, &argv, true );
159+ initializeLogging (argc, argv);
160+ LOG (INFO) << " commandline: " << line;
161161 CHECK_EQ (argc, 1 ) << " Unknown commandline argument: " << argv[1 ];
162162
163163 installProfilerSwitch ();
You can’t perform that action at this time.
0 commit comments