summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-07-18 06:26:25 -0700
committerVicent Martí <vicent@github.com>2013-07-18 06:26:25 -0700
commit794003650e041668405a5ee12a7f763dca951758 (patch)
tree51cb04c6d460779b3116b7841ed05a679bac42e2
parent99a9c86cb654eb37bc77b31b76619e843d89de09 (diff)
parente49dc6872d53dfa09d8a93dc5733328f2bd3204d (diff)
downloadlibgit2-794003650e041668405a5ee12a7f763dca951758.tar.gz
Merge pull request #1736 from ben/default-to-cdecl
Switch default calling convention to cdecl
-rw-r--r--CMakeLists.txt15
1 files changed, 6 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1086005c3..2afa1e03d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,16 +30,13 @@ OPTION( ENABLE_TRACE "Enables tracing support" OFF )
OPTION( LIBGIT2_FILENAME "Name of the produced binary" OFF )
IF(MSVC)
- # This option is only availalbe when building with MSVC. By default,
- # libgit2 is build using the stdcall calling convention, as that's what
- # the CLR expects by default and how the Windows API is built.
+ # This option is only availalbe when building with MSVC. By default, libgit2
+ # is build using the cdecl calling convention, which is useful if you're
+ # writing C. However, the CLR and Win32 API both expect stdcall.
#
- # If you are writing a C or C++ program and want to link to libgit2, you
- # have to either:
- # - Add /Gz to the compiler options of _your_ program / library.
- # - Turn this off by invoking CMake with the "-DSTDCALL=Off" argument.
- #
- OPTION( STDCALL "Build libgit2 with the __stdcall convention" ON )
+ # If you are writing a CLR program and want to link to libgit2, you'll want
+ # to turn this on by invoking CMake with the "-DSTDCALL=ON" argument.
+ OPTION( STDCALL "Build libgit2 with the __stdcall convention" OFF )
# This option must match the settings used in your program, in particular if you
# are linking statically