Skip to content

Commit

Permalink
Regards #505: Trying to overcome MSVC complaint about static-vs-dynam…
Browse files Browse the repository at this point in the history
…ic linking
  • Loading branch information
eyalroz committed Apr 22, 2023
1 parent 7bebb1b commit 98cb600
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ include(CompileWithWarnings)
if(MSVC)
# MSVC is very problematic!
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /NODEFAULTLIB:nvptxcompiler_static.lib")
set(CMAKE_CXX_STANDARD 17)
add_compile_definitions("$<$<COMPILE_LANGUAGE:C,CXX>:_CRT_SECURE_NO_DEPRECATE>")
add_compile_definitions("$<$<COMPILE_LANGUAGE:C,CXX>:_CRT_SECURE_NO_WARNINGS>")
add_compile_definitions("$<$<COMPILE_LANGUAGE:C,CXX>:_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING>")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
else()
set(CMAKE_CXX_STANDARD 11)
endif()
Expand Down

0 comments on commit 98cb600

Please sign in to comment.