@@ -13,21 +13,106 @@ include(cmake/util/Util.cmake)
1313include (cmake/util/MshadowUtil.cmake)
1414include (cmake/util/FindCUDA.cmake)
1515
16- # NOTE: do not modify this file to change option values.
17- # Use bash script/build_dgl.sh -e '-DOPTION=VALUE' through command-line.
18- dgl_option(USE_CUDA "Build with CUDA" OFF )
19- dgl_option(USE_OPENMP "Build with OpenMP" ON )
20- dgl_option(USE_LIBXSMM "Build with LIBXSMM library optimization" ON )
21- dgl_option(BUILD_CPP_TEST "Build cpp unittest executables" OFF )
22- dgl_option(LIBCXX_ENABLE_PARALLEL_ALGORITHMS "Enable the parallel algorithms library. This requires the PSTL to be available." OFF )
23- dgl_option(USE_S3 "Build with S3 support" OFF )
24- dgl_option(USE_HDFS "Build with HDFS support" OFF ) # Set env HADOOP_HDFS_HOME if needed
25- dgl_option(REBUILD_LIBXSMM "Clean LIBXSMM build cache at every build" OFF ) # Set env HADOOP_HDFS_HOME if needed
26- dgl_option(USE_EPOLL "Build with epoll for socket communicator" ON )
27- dgl_option(TP_BUILD_LIBUV "Build libuv together with tensorpipe (only impacts Linux)" ON )
28- dgl_option(BUILD_TORCH "Build the PyTorch plugin" OFF )
29- dgl_option(BUILD_SPARSE "Build DGL sparse library" ON )
30- dgl_option(TORCH_PYTHON_INTERPS "Python interpreter used to build tensoradapter and DGL sparse library" python3)
16+ # TODO(#5475): Clean up the old flags after CI and regression framework adopt to the new setup.
17+ if (NOT DEFINED BUILD_TYPE )
18+ dgl_option(USE_CUDA "Build with CUDA" OFF )
19+ dgl_option(USE_OPENMP "Build with OpenMP" ON )
20+ dgl_option(USE_LIBXSMM "Build with LIBXSMM library optimization" ON )
21+ dgl_option(BUILD_CPP_TEST "Build cpp unittest executables" OFF )
22+ dgl_option(LIBCXX_ENABLE_PARALLEL_ALGORITHMS "Enable the parallel algorithms library. This requires the PSTL to be available." OFF )
23+ dgl_option(USE_S3 "Build with S3 support" OFF )
24+ dgl_option(USE_HDFS "Build with HDFS support" OFF ) # Set env HADOOP_HDFS_HOME if needed
25+ dgl_option(REBUILD_LIBXSMM "Clean LIBXSMM build cache at every build" OFF ) # Set env HADOOP_HDFS_HOME if needed
26+ dgl_option(USE_EPOLL "Build with epoll for socket communicator" ON )
27+ dgl_option(BUILD_TORCH "Build the PyTorch plugin" OFF )
28+ dgl_option(BUILD_SPARSE "Build DGL sparse library" ON )
29+ dgl_option(BUILD_GRAPHBOLT "Build Graphbolt library" OFF )
30+ dgl_option(TORCH_PYTHON_INTERPS "Python interpreter used to build tensoradapter and DGL sparse library" python3)
31+ else ()
32+ # Options for building DGL.
33+ # NOTE: do not modify this file to change option values.
34+ # Use bash script/build_dgl.sh -e '-DOPTION=VALUE' through command-line.
35+ dgl_option(
36+ BUILD_TYPE
37+ "Type of the build: dev, test or release"
38+ "dev"
39+ )
40+ message (STATUS "Build for ${BUILD_TYPE} " )
41+
42+ dgl_option(
43+ USE_CUDA
44+ "Build with CUDA"
45+ OFF
46+ )
47+ dgl_option(
48+ TORCH_PYTHON_INTERPS
49+ "Python interpreter used to build tensoradapter and DGL sparse library"
50+ python3
51+ )
52+
53+ # Options for building DGL features, supported: "none", "dev", "test", "release", "all".
54+ # NOTE: do not modify this file to change option values.
55+ # Use bash script/build_dgl.sh -e '-DFEATURE_NAME=ON/OFF' through command-line.
56+ dgl_feature_option(
57+ BUILD_SPARSE
58+ "Build DGL sparse library"
59+ "all"
60+ )
61+ dgl_feature_option(
62+ BUILD_TORCH
63+ "Build the PyTorch plugin"
64+ "all"
65+ )
66+ dgl_feature_option(
67+ USE_EPOLL
68+ "Build with epoll for socket communicator"
69+ "all"
70+ )
71+ dgl_feature_option(
72+ USE_LIBXSMM
73+ "Build with LIBXSMM library optimization"
74+ "all"
75+ )
76+ dgl_feature_option(
77+ USE_OPENMP
78+ "Build with OpenMP"
79+ "all"
80+ )
81+
82+ dgl_feature_option(
83+ BUILD_GRAPHBOLT
84+ "Build Graphbolt library"
85+ "dev" "test"
86+ )
87+
88+ dgl_feature_option(
89+ LIBCXX_ENABLE_PARALLEL_ALGORITHMS
90+ "Enable the parallel algorithms library. This requires the PSTL to be available."
91+ "none"
92+ )
93+ dgl_feature_option(
94+ REBUILD_LIBXSMM
95+ "Clean LIBXSMM build cache at every build"
96+ "none"
97+ )
98+ dgl_feature_option(
99+ USE_HDFS
100+ "Build with HDFS support"
101+ "none"
102+ ) # Set env HADOOP_HDFS_HOME if needed
103+ dgl_feature_option(
104+ USE_S3
105+ "Build with S3 support"
106+ "none"
107+ )
108+
109+ # Build cpp test only in test build.
110+ dgl_feature_option(
111+ BUILD_CPP_TEST
112+ "Build cpp unittest executables"
113+ "test"
114+ )
115+ endif ()
31116
32117# Set debug compile option for gdb, only happens when -DCMAKE_BUILD_TYPE=DEBUG
33118if (NOT MSVC )
0 commit comments