From 1b5078f6b186b92c237e2148a9008be8d372f675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Sat, 6 Aug 2011 13:58:16 +0200 Subject: [PATCH] Use __stdcall by default on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Carlos Martín Nieto --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cb9385210..0dbb6d13e 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")