@@ -121,10 +121,10 @@ option(CUPDLP_GPU "Build pdlp with GPU" OFF)
121121
122122message (STATUS "Build pdlp with GPU: ${CUPDLP_GPU} " )
123123
124- if (NOT LINUX)
125- set (CUPDLP_GPU OFF )
126- message (STATUS "CUPLDP with Nvidia is only supported on Linux at the moment. Using CPU version." )
127- endif ()
124+ # if (NOT LINUX)
125+ # set (CUPDLP_GPU OFF)
126+ # message(STATUS "CUPLDP with Nvidia is only supported on Linux at the moment. Using CPU version.")
127+ # endif()
128128
129129if (CUPDLP_GPU)
130130 set (CUPDLP_CPU OFF )
@@ -409,11 +409,16 @@ endif()
409409add_compile_options ("$<$<AND:$<CONFIG:Debug,RelWithDebInfo>,$<COMPILE_LANGUAGE:CUDA>>:-G>" )
410410# add_compile_options("$<$<COMPILE_LANGUAGE:CUDA>:-G>")
411411
412- add_compile_options ("-Wno-deprecated-declarations" )
412+ if (CUPDLP_GPU AND UNIX )
413+ add_compile_options ("-Wno-deprecated-declarations" )
414+ endif ()
413415# add_compile_options("-Wno-implicit-function-declaration")
414416
415417# set(CMAKE_C_FLAGS "-Wno-deprecated-declarations")
416- set (CMAKE_C_FLAGS "-Wno-implicit-function-declaration" )
418+ if (UNIX )
419+ set (CMAKE_C_FLAGS "-Wno-implicit-function-declaration" )
420+ endif ()
421+
417422
418423
419424# If Visual Studio targets are being built.
@@ -426,8 +431,15 @@ if(MSVC)
426431
427432 # Try to split large pdb files into objects.
428433 # https://github.com/tensorflow/tensorflow/issues/31610
429- add_compile_options ("/Z7" )
430- add_link_options ("/DEBUG:FASTLINK" )
434+ # add_compile_options("/Z7")
435+ # add_link_options("/DEBUG:FASTLINK")
436+
437+ add_compile_options ("$<$<COMPILE_LANGUAGE:C,CXX>:/Z7>" )
438+
439+ if (NOT CUPDLP_GPU)
440+ add_compile_options ("$<$<COMPILE_LANGUAGE:C,CXX>:/DEBUG:FASTLINK>" )
441+ endif ()
442+
431443 if (STDCALL)
432444 # /Gz - stdcall calling convention
433445 add_definitions (/Gz)
0 commit comments