-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] Build process shouldn’t modify source tree #566
Conversation
Travis fails on some utests build using Makefiles separate from the ones build by CMake. |
@codingforfun See #561. This is an issue unrelated to your work here, so don't worry about it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This reverts commit 557c098.
This seems to break the xgboost build: git clone --recurse-submodules https://github.com/dmlc/xgboost.git
cd xgboost
mkdir build
cd build
cmake ..
make I get the following error: In file included from /home/rou/src/xgboost/include/../../dmlc-core/include/dmlc/./logging.h:16,
from /home/rou/src/xgboost/include/../../dmlc-core/include/dmlc/io.h:15,
from /home/rou/src/xgboost/rabit/include/rabit/./internal/../serializable.h:14,
from /home/rou/src/xgboost/rabit/include/rabit/./internal/engine.h:10,
from /home/rou/src/xgboost/rabit/include/rabit/rabit.h:48,
from /home/rou/src/xgboost/src/common/timer.cc:4:
/home/rou/src/xgboost/include/../../dmlc-core/include/dmlc/././base.h:282:10: fatal error: dmlc/build_config.h: No such file or directory
#include <dmlc/build_config.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
src/CMakeFiles/objxgboost.dir/build.make:153: recipe for target 'src/CMakeFiles/objxgboost.dir/common/timer.cc.o' failed
make[2]: *** [src/CMakeFiles/objxgboost.dir/common/timer.cc.o] Error 1
CMakeFiles/Makefile2:295: recipe for target 'src/CMakeFiles/objxgboost.dir/all' failed
make[1]: *** [src/CMakeFiles/objxgboost.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2 Any ideas on what's going on? |
@rongou I just tried |
Hmm never mind. Somehow it's picking up a separate |
It’s best practice to not modify the source tree during build time.
CMake strongly encourages this.
This PR changes the cmake build process to create the confuigured header file
build_config.h
in the build tree instead of the source tree.