aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaakov <yselkowitz@users.sourceforge.net>2011-10-27 11:17:44 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:19 -0300
commit93001f6a1fe8fa1fe7bf4d7d5dcda7fefae888b8 (patch)
tree7d0186dd1a58c405eb4fbad1b0fa962b4e392870
parent9bd43d046bfc93eefa682bbce95ccc53fc1b0550 (diff)
Fix bug 1008 - "ApiExtractor Cygwin patch"
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
-rw-r--r--CMakeLists.txt4
-rw-r--r--apiextractormacros.h2
-rw-r--r--data/ApiExtractorConfig.cmake.in2
-rw-r--r--parser/rpp/preprocessor.cpp1
4 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62065e89..ca332704 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,7 +24,9 @@ if(MSVC)
set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /GR /EHsc /DWIN32 /D_WINDOWS /D_SCL_SECURE_NO_WARNINGS")
elseif(CMAKE_HOST_UNIX)
option(ENABLE_GCC_OPTIMIZATION "Enable specific GCC flags to optimize library size and performance. Only available on Release Mode" 0)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden")
+ if(NOT CYGWIN)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden")
+ endif()
set(CMAKE_CXX_FLAGS_DEBUG "-g")
if(ENABLE_GCC_OPTIMIZATION)
set(CMAKE_BUILD_TYPE Release)
diff --git a/apiextractormacros.h b/apiextractormacros.h
index 1c493c23..6430c4f7 100644
--- a/apiextractormacros.h
+++ b/apiextractormacros.h
@@ -3,7 +3,7 @@
// APIEXTRACTOR_API is used for the public API symbols.
-#if defined _WIN32 || defined __CYGWIN__
+#if defined _WIN32
#if APIEXTRACTOR_EXPORTS
#define APIEXTRACTOR_API __declspec(dllexport)
#else
diff --git a/data/ApiExtractorConfig.cmake.in b/data/ApiExtractorConfig.cmake.in
index 3866829e..6e6f4196 100644
--- a/data/ApiExtractorConfig.cmake.in
+++ b/data/ApiExtractorConfig.cmake.in
@@ -5,6 +5,8 @@
SET(APIEXTRACTOR_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/apiextractor@apiextractor_SUFFIX@")
if(MSVC)
SET(APIEXTRACTOR_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@apiextractor@apiextractor_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@.lib")
+elseif(CYGWIN)
+ SET(APIEXTRACTOR_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_IMPORT_LIBRARY_PREFIX@apiextractor@apiextractor_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@CMAKE_IMPORT_LIBRARY_SUFFIX@")
elseif(WIN32)
SET(APIEXTRACTOR_LIBRARY "@CMAKE_INSTALL_PREFIX@/bin/@CMAKE_SHARED_LIBRARY_PREFIX@apiextractor@apiextractor_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
else()
diff --git a/parser/rpp/preprocessor.cpp b/parser/rpp/preprocessor.cpp
index be6a8518..9a4f8b04 100644
--- a/parser/rpp/preprocessor.cpp
+++ b/parser/rpp/preprocessor.cpp
@@ -25,6 +25,7 @@
#include "preprocessor.h"
#include <string>
+#include <cstdio>
// register callback for include hooks
static void includeFileHook(const std::string &, const std::string &, FILE *);