diff --git a/src/Native/CMakeLists.txt b/src/Native/CMakeLists.txt index 9334b1c45c..0100cc353c 100644 --- a/src/Native/CMakeLists.txt +++ b/src/Native/CMakeLists.txt @@ -18,6 +18,9 @@ if(WIN32) add_compile_options($<$:-DNDEBUG>) add_compile_options($<$:-DNDEBUG>) add_compile_options($<$:/Od>) + add_compile_options($<$:/MTd>) # /MT will static link the VC runtime library, so it doesn't need to be installed on the target machine + add_compile_options($<$:/MT>) + add_compile_options($<$:/MT>) add_compile_options(/guard:cf) add_compile_options(/d2Zi+) # make optimized builds debugging easier add_compile_options(/nologo) # Suppress Startup Banner @@ -62,6 +65,8 @@ if(WIN32) list(APPEND RESOURCES ${CMAKE_SOURCE_DIR}/../../Tools/NativeVersion.rc) else() add_compile_options(-Wno-unused-local-typedef) + add_compile_options(-fPIC) + add_compile_options(-fvisibility=hidden) add_definitions(-Werror) # treat warnings as errors endif()