From e8a4caa561876121321e38cf54679203afb22d05 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Tue, 5 Feb 2013 18:57:49 -0800 Subject: [PATCH] Some initial minor MSVC support --- cpp/BoostParts/CMakeLists.txt | 6 ++++++ plugin/youcompleteme.vim | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cpp/BoostParts/CMakeLists.txt b/cpp/BoostParts/CMakeLists.txt index a22ec09d..216bd52f 100644 --- a/cpp/BoostParts/CMakeLists.txt +++ b/cpp/BoostParts/CMakeLists.txt @@ -86,6 +86,12 @@ endif() # TODO: remove this when it's fixed upstream (probably boost 1.53). add_definitions( -DBOOST_THREAD_DONT_USE_CHRONO ) +if( MSVC ) + # BOOST_PYTHON_SOURCE makes boost use the correct __declspec and + # BOOST_ALL_NO_LIB turns off MSVC library autolinking + add_definitions( -DBOOST_PYTHON_SOURCE -DBOOST_ALL_NO_LIB ) +endif() + ############################################################################# include_directories( diff --git a/plugin/youcompleteme.vim b/plugin/youcompleteme.vim index 43acc035..959fafb7 100644 --- a/plugin/youcompleteme.vim +++ b/plugin/youcompleteme.vim @@ -35,7 +35,7 @@ function! s:HasYcmCore() let path_prefix = s:script_folder_path . '/../python/' if filereadable(path_prefix . 'ycm_core.so') return 1 - elseif filereadable(path_prefix . 'ycm_core.dll') + elseif filereadable(path_prefix . 'ycm_core.pyd') return 1 endif return 0