File tree Expand file tree Collapse file tree 3 files changed +22
-6
lines changed
Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -401,13 +401,16 @@ endif()
401401add_compile_options ("$<$<AND:$<CONFIG:Debug,RelWithDebInfo>,$<COMPILE_LANGUAGE:CUDA>>:-G>" )
402402# add_compile_options("$<$<COMPILE_LANGUAGE:CUDA>:-G>")
403403
404- if (CUPDLP_GPU)
405- add_compile_options ("-Wno-deprecated-declarations" )
404+ if (CUPDLP_GPU AND UNIX )
405+ add_compile_options ("-Wno-deprecated-declarations" )
406406endif ()
407407# add_compile_options("-Wno-implicit-function-declaration")
408408
409409# set(CMAKE_C_FLAGS "-Wno-deprecated-declarations")
410- set (CMAKE_C_FLAGS "-Wno-implicit-function-declaration" )
410+ if (UNIX )
411+ set (CMAKE_C_FLAGS "-Wno-implicit-function-declaration" )
412+ endif ()
413+
411414
412415
413416# If Visual Studio targets are being built.
@@ -424,7 +427,10 @@ if(MSVC)
424427 # add_link_options("/DEBUG:FASTLINK")
425428
426429 add_compile_options ("$<$<COMPILE_LANGUAGE:C,CXX>:/Z7>" )
427- add_compile_options ("$<$<COMPILE_LANGUAGE:C,CXX>:/DEBUG:FASTLINK>" )
430+
431+ if (NOT CUPDLP_GPU)
432+ add_compile_options ("$<$<COMPILE_LANGUAGE:C,CXX>:/DEBUG:FASTLINK>" )
433+ endif ()
428434
429435 if (STDCALL)
430436 # /Gz - stdcall calling convention
Original file line number Diff line number Diff line change @@ -201,7 +201,13 @@ else()
201201 set (CUPDLP_INCLUDE_DIR "${PROJECT_SOURCE_DIR} /src/pdlp/cupdlp/" )
202202
203203 add_subdirectory (pdlp/cupdlp/cuda)
204- target_link_libraries (highs cudalin ${CUDA_LIBRARY} m)
204+
205+ if (WIN32 )
206+ target_link_libraries (highs cudalin ${CUDA_LIBRARY} )
207+ else ()
208+ target_link_libraries (highs cudalin ${CUDA_LIBRARY} m)
209+ endif ()
210+
205211 set_target_properties (highs PROPERTIES CUDA_SEPARABLE_COMPILATION ON )
206212
207213 endif ()
Original file line number Diff line number Diff line change @@ -28,7 +28,11 @@ target_compile_definitions(cudalin
2828 $<$<CONFIG:Debug>:CUPDLP_DEBUG>
2929)
3030
31- target_link_libraries (cudalin ${CUDA_LIBRARY} m)
31+ if (WIN32 )
32+ target_link_libraries (cudalin ${CUDA_LIBRARY} )
33+ else ()
34+ target_link_libraries (cudalin ${CUDA_LIBRARY} m)
35+ endif ()
3236
3337# add a test
3438add_executable (testcudalin test_cuda_linalg.c)
You can’t perform that action at this time.
0 commit comments