Refactor CMake scripts. (#4323)

* Refactor CMake scripts.

* Remove CMake CUDA wrapper.
* Bump CMake version for CUDA.
* Use CMake to handle Doxygen.
* Split up CMakeList.
* Export install target.
* Use modern CMake.
* Remove build.sh
* Workaround for gpu_hist test.
* Use cmake 3.12.

* Revert machine.conf.

* Move CLI test to gpu.

* Small cleanup.

* Support using XGBoost as submodule.

* Fix windows

* Fix cpp tests on Windows

* Remove duplicated find_package.
This commit is contained in:
Jiaming Yuan
2019-04-16 01:08:12 +08:00
committed by Philip Hyunsu Cho
parent 84d992babc
commit 207f058711
28 changed files with 578 additions and 429 deletions

View File

@@ -5,6 +5,8 @@
#ifndef XGBOOST_BUILD_CONFIG_H_
#define XGBOOST_BUILD_CONFIG_H_
// These check are for Makefile.
#if !defined(XGBOOST_MM_PREFETCH_PRESENT) && !defined(XGBOOST_BUILTIN_PREFETCH_PRESENT)
/* default logic for software pre-fetching */
#if (defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))) || defined(__INTEL_COMPILER)
// Enable _mm_prefetch for Intel compiler and MSVC+x86
@@ -15,4 +17,6 @@
#define XGBOOST_BUILTIN_PREFETCH_PRESENT
#endif // GUARDS
#endif // !defined(XGBOOST_MM_PREFETCH_PRESENT) && !defined()
#endif // XGBOOST_BUILD_CONFIG_H_

View File

@@ -17,9 +17,6 @@
#include <stdint.h>
#endif // __cplusplus
// XGBoost C API will include APIs in Rabit C API
#include <rabit/c_api.h>
#if defined(_MSC_VER) || defined(_WIN32)
#define XGB_DLL XGB_EXTERN_C __declspec(dllexport)
#else