]> git.proxmox.com Git - libgit2.git/commitdiff
Use __stdcall by default on Windows
authorCarlos Martín Nieto <carlos@cmartin.tk>
Sat, 6 Aug 2011 11:58:16 +0000 (13:58 +0200)
committerCarlos Martín Nieto <carlos@cmartin.tk>
Sat, 6 Aug 2011 16:18:12 +0000 (18:18 +0200)
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
CMakeLists.txt

index cb9385210d464aee338c2750f35515ae1c1a48a2..0dbb6d13e8045375702d013079c26f592c57c05c 100644 (file)
@@ -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")