File tree Expand file tree Collapse file tree 6 files changed +32
-8
lines changed Expand file tree Collapse file tree 6 files changed +32
-8
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ set "LIB=%BUILD_PREFIX%\Library\lib;%BUILD_PREFIX%\compiler\lib;%LIB%"
4
4
set " INCLUDE = %BUILD_PREFIX% \include;%INCLUDE% "
5
5
6
6
" %PYTHON% " setup.py clean --all
7
- set " SKBUILD_ARGS = -G Ninja -- -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx"
7
+ set " SKBUILD_ARGS = -G Ninja -- -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON "
8
8
9
9
FOR %%V IN (14.0.0 14 15.0.0 15 16.0.0 16) DO @ (
10
10
REM set DIR_HINT if directory exists
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ if [ -e "_skbuild" ]; then
14
14
${PYTHON} setup.py clean --all
15
15
fi
16
16
export CMAKE_GENERATOR=" Ninja"
17
- SKBUILD_ARGS=" -- -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icpx"
17
+ SKBUILD_ARGS=" -- -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icpx -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON "
18
18
echo " ${PYTHON} setup.py install ${SKBUILD_ARGS} "
19
19
20
20
if [ -n " ${WHEELS_OUTPUT_FOLDER} " ]; then
Original file line number Diff line number Diff line change @@ -15,13 +15,17 @@ if(WIN32)
15
15
"-Wmissing-declarations "
16
16
"-Wno-unused-parameter "
17
17
)
18
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Ox ${WARNING_FLAGS} " )
19
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Ox ${WARNING_FLAGS} " )
18
+ string (CONCAT SDL_FLAGS
19
+ "/GS "
20
+ "/DynamicBase "
21
+ )
22
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Ox ${WARNING_FLAGS} ${SDL_FLAGS} " )
23
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Ox ${WARNING_FLAGS} ${SDL_FLAGS} " )
20
24
set (CMAKE_C_FLAGS_DEBUG
21
- "${CMAKE_C_FLAGS_DEBUG} ${WARNING_FLAGS} -O0 -g1 -DDEBUG"
25
+ "${CMAKE_C_FLAGS_DEBUG} ${WARNING_FLAGS} ${SDL_FLAGS} -O0 -g1 -DDEBUG"
22
26
)
23
27
set (CMAKE_CXX_FLAGS_DEBUG
24
- "${CMAKE_CXX_FLAGS_DEBUG} ${WARNING_FLAGS} -O0 -g1 -DDEBUG"
28
+ "${CMAKE_CXX_FLAGS_DEBUG} ${WARNING_FLAGS} ${SDL_FLAGS} -O0 -g1 -DDEBUG"
25
29
)
26
30
set (DPCTL_LDFLAGS "/NXCompat;/DynamicBase" )
27
31
elseif (UNIX )
@@ -44,6 +48,7 @@ elseif(UNIX)
44
48
"-Wformat-security "
45
49
"-fno-strict-overflow "
46
50
"-fno-delete-null-pointer-checks "
51
+ "-fwrapv "
47
52
)
48
53
string (CONCAT CFLAGS
49
54
"${WARNING_FLAGS} "
Original file line number Diff line number Diff line change @@ -49,5 +49,7 @@ target_include_directories(${python_module_name}
49
49
${CMAKE_CURRENT_SOURCE_DIR} /libtensor/include
50
50
${CMAKE_CURRENT_SOURCE_DIR} /libtensor/source/
51
51
)
52
+ set (_linker_options "LINKER:${DPCTL_LDFLAGS} " )
53
+ target_link_options (${python_module_name} PRIVATE ${_linker_options} )
52
54
add_dependencies (${python_module_name} _dpctl4pybind11_deps )
53
55
install (TARGETS ${python_module_name} DESTINATION "dpctl/tensor" )
Original file line number Diff line number Diff line change @@ -111,8 +111,12 @@ if(WIN32)
111
111
"-Wuninitialized "
112
112
"-Wmissing-declarations "
113
113
)
114
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} " )
115
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS} " )
114
+ string (CONCAT SDL_FLAGS
115
+ "/GS "
116
+ "/DynamicBase "
117
+ )
118
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} ${SDL_FLAGS} " )
119
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS} ${SDL_FLAGS} " )
116
120
set (CMAKE_C_FLAGS_DEBUG
117
121
"${CMAKE_C_FLAGS_DEBUG} ${WARNING_FLAGS} -O0 -ggdb3 -DDEBUG"
118
122
)
@@ -139,6 +143,7 @@ elseif(UNIX)
139
143
"-Wformat-security "
140
144
"-fno-strict-overflow "
141
145
"-fno-delete-null-pointer-checks "
146
+ "-fwrapv "
142
147
)
143
148
string (CONCAT CFLAGS
144
149
"${WARNING_FLAGS} "
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ def run(
28
28
compiler_root = None ,
29
29
cmake_executable = None ,
30
30
use_glog = False ,
31
+ verbose = False ,
31
32
cmake_opts = "" ,
32
33
):
33
34
build_system = None
@@ -58,6 +59,10 @@ def run(
58
59
"-DDPCTL_ENABLE_L0_PROGRAM_CREATION=" + ("ON" if level_zero else "OFF" ),
59
60
"-DDPCTL_ENABLE_GLOG:BOOL=" + ("ON" if use_glog else "OFF" ),
60
61
]
62
+ if verbose :
63
+ cmake_args += [
64
+ "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON" ,
65
+ ]
61
66
if cmake_opts :
62
67
cmake_args += cmake_opts .split ()
63
68
subprocess .check_call (
@@ -113,6 +118,12 @@ def run(
113
118
dest = "glog" ,
114
119
action = "store_true" ,
115
120
)
121
+ driver .add_argument (
122
+ "--verbose" ,
123
+ help = "Build using vebose makefile mode" ,
124
+ dest = "verbose" ,
125
+ action = "store_true" ,
126
+ )
116
127
driver .add_argument (
117
128
"--cmake-opts" ,
118
129
help = "DPCTLSyclInterface uses Google logger" ,
@@ -173,5 +184,6 @@ def run(
173
184
compiler_root = args .compiler_root ,
174
185
cmake_executable = args .cmake_executable ,
175
186
use_glog = args .glog ,
187
+ verbose = args .verbose ,
176
188
cmake_opts = args .cmake_opts ,
177
189
)
You can’t perform that action at this time.
0 commit comments