summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2011-08-08 11:10:16 -0700
committerVicent Martí <tanoku@gmail.com>2011-08-08 11:10:16 -0700
commita41bf612221d1b709af96b58209933653f3d1355 (patch)
tree17261b38e62f2ebb7bffbb684892d24b77c2c108 /CMakeLists.txt
parent5bd4fb59bc4d625eb89e0eb4492d17ec22476163 (diff)
parent1b5078f6b186b92c237e2148a9008be8d372f675 (diff)
downloadlibgit2-a41bf612221d1b709af96b58209933653f3d1355.tar.gz
Merge pull request #357 from carlosmn/calling-convention
Use __stdcall by default on Windows
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cc77f7b14..0e516cacb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,10 +45,14 @@ SET(INSTALL_INC include CACHE PATH "Where to install headers to.")
OPTION (BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON)
OPTION (BUILD_TESTS "Build Tests" ON)
OPTION (THREADSAFE "Build libgit2 as threadsafe" OFF)
+OPTION (STDCALL "Buildl libgit2 with the __stdcall convention (Windows)" ON)
# Platform specific compilation flags
IF (MSVC)
SET(CMAKE_C_FLAGS "/W4 /WX /nologo /Zi")
+ IF (STDCALL)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Gz")
+ ENDIF ()
# TODO: bring back /RTC1 /RTCc
SET(CMAKE_C_FLAGS_DEBUG "/Od /DEBUG /MTd")
SET(CMAKE_C_FLAGS_RELEASE "/MT /O2")