diff options
author | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-08-06 13:58:16 +0200 |
---|---|---|
committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-08-06 18:18:12 +0200 |
commit | 1b5078f6b186b92c237e2148a9008be8d372f675 (patch) | |
tree | 30085c3e69513738d6af8c4351fcc065f5b6966c | |
parent | 6e6ec54bebb41fd0c0f1171b04d13306937b9636 (diff) | |
download | libgit2-1b5078f6b186b92c237e2148a9008be8d372f675.tar.gz |
Use __stdcall by default on Windows
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
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") |