WSL/SLF GitLab Repository

Commit 335e80c5 authored by Thomas Egger's avatar Thomas Egger
Browse files

Generating the IOHandler.h file out of IOHandler.cmake.hpp through CMake: That...

Generating the IOHandler.h file out of IOHandler.cmake.hpp through CMake: That way no specific definitions need to be added to the compiler flags.
parent c16e7fd7
......@@ -22,6 +22,21 @@
#error
#endif*/
#cmakedefine PLUGIN_ARCIO
#cmakedefine PLUGIN_A3DIO
#cmakedefine PLUGIN_ARPSIO
#cmakedefine PLUGIN_GRASSIO
#cmakedefine PLUGIN_GEOTOPIO
#cmakedefine PLUGIN_SMETIO
#cmakedefine PLUGIN_SNIO
#cmakedefine PLUGIN_PGMIO
#cmakedefine PLUGIN_IMISIO
#cmakedefine PLUGIN_GRIBIO
#cmakedefine PLUGIN_PNGIO
#cmakedefine PLUGIN_BORMAIO
#cmakedefine PLUGIN_COSMOXMLIO
#cmakedefine PLUGIN_GSNIO
#include <meteoio/IOInterface.h>
#include <meteoio/IOExceptions.h>
#include <meteoio/IOPlugin.h>
......
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/")
IF(PLUGIN_ARCIO)
IF(MSVC)
ADD_DEFINITIONS(/DPLUGIN_ARCIO) #it looks like some VC++ versions don't support -D syntax
ELSE(MSVC)
ADD_DEFINITIONS(-DPLUGIN_ARCIO)
ENDIF(MSVC)
SET(plugins_sources ${plugins_sources} plugins/ARCIO.cc)
ENDIF(PLUGIN_ARCIO)
IF(PLUGIN_A3DIO)
IF(MSVC)
ADD_DEFINITIONS(/DPLUGIN_A3DIO) #it looks like some VC++ versions don't support -D syntax
ELSE(MSVC)
ADD_DEFINITIONS(-DPLUGIN_A3DIO)
ENDIF(MSVC)
SET(plugins_sources ${plugins_sources} plugins/A3DIO.cc)
ENDIF(PLUGIN_A3DIO)
IF(PLUGIN_ARPSIO)
IF(MSVC)
ADD_DEFINITIONS(/DPLUGIN_ARPSIO) #it looks like some VC++ versions don't support -D syntax
ELSE(MSVC)
ADD_DEFINITIONS(-DPLUGIN_ARPSIO)
ENDIF(MSVC)
SET(plugins_sources ${plugins_sources} plugins/ARPSIO.cc)
ENDIF(PLUGIN_ARPSIO)
......@@ -31,11 +16,6 @@ IF(PLUGIN_BORMAIO)
FIND_PACKAGE(LibXML++ REQUIRED)
INCLUDE_DIRECTORIES(${LibXML++_INCLUDE_DIRS})
SET(plugin_libs ${plugin_libs} ${LibXML++_LIBRARIES})
IF(MSVC)
ADD_DEFINITIONS(/DPLUGIN_BORMAIO) #it looks like some VC++ versions don't support -D syntax
ELSE(MSVC)
ADD_DEFINITIONS(-DPLUGIN_BORMAIO)
ENDIF(MSVC)
SET(plugins_sources ${plugins_sources} plugins/BormaIO.cc)
ENDIF(PLUGIN_BORMAIO)
......@@ -43,20 +23,10 @@ IF(PLUGIN_COSMOXMLIO)
FIND_PACKAGE(LibXML++ REQUIRED)
INCLUDE_DIRECTORIES(${LibXML++_INCLUDE_DIRS})
SET(plugin_libs ${plugin_libs} ${LibXML++_LIBRARIES})
IF(MSVC)
ADD_DEFINITIONS(/DPLUGIN_COSMOXMLIO) #it looks like some VC++ versions don't support -D syntax
ELSE(MSVC)
ADD_DEFINITIONS(-DPLUGIN_COSMOXMLIO)
ENDIF(MSVC)
SET(plugins_sources ${plugins_sources} plugins/CosmoXMLIO.cc)
ENDIF(PLUGIN_COSMOXMLIO)
IF(PLUGIN_GRASSIO)
IF(MSVC)
ADD_DEFINITIONS(/DPLUGIN_GRASSIO) #it looks like some VC++ versions don't support -D syntax
ELSE(MSVC)
ADD_DEFINITIONS(-DPLUGIN_GRASSIO)
ENDIF(MSVC)
SET(plugins_sources ${plugins_sources} plugins/GrassIO.cc)
ENDIF(PLUGIN_GRASSIO)
......@@ -64,20 +34,10 @@ IF(PLUGIN_GRIBIO)
FIND_PACKAGE(GribApi REQUIRED)
INCLUDE_DIRECTORIES(${GribApi_INCLUDE_DIRS})
SET(plugin_libs ${plugin_libs} ${GribApi_LIBRARIES})
IF(MSVC)
ADD_DEFINITIONS(/DPLUGIN_GRIBIO) #it looks like some VC++ versions don't support -D syntax
ELSE(MSVC)
ADD_DEFINITIONS(-DPLUGIN_GRIBIO)
ENDIF(MSVC)
SET(plugins_sources ${plugins_sources} plugins/GRIBIO.cc)
ENDIF(PLUGIN_GRIBIO)
IF(PLUGIN_GEOTOPIO)
IF(MSVC)
ADD_DEFINITIONS(/DPLUGIN_GEOTOPIO) #it looks like some VC++ versions don't support -D syntax
ELSE(MSVC)
ADD_DEFINITIONS(-DPLUGIN_GEOTOPIO)
ENDIF(MSVC)
SET(plugins_sources ${plugins_sources} plugins/GeotopIO.cc)
ENDIF(PLUGIN_GEOTOPIO)
......@@ -100,12 +60,6 @@ IF(PLUGIN_GSNIO)
SET(EXTRA_LINK_LIBS "ws2_32")
ENDIF(WIN32)
IF(MSVC)
ADD_DEFINITIONS(/DPLUGIN_GSNIO) #it looks like some VC++ versions don't support -D syntax
ELSE(MSVC)
ADD_DEFINITIONS(-DPLUGIN_GSNIO)
ENDIF(MSVC)
SET(plugins_sources ${plugins_sources} plugins/GSNIO.cc plugins/gsn/soapGSNWebServiceSoap12BindingProxy.cpp plugins/gsn/soapC.cpp plugins/gsn/stdsoap2.cpp)
ENDIF(PLUGIN_GSNIO)
......@@ -113,20 +67,10 @@ IF(PLUGIN_IMISIO)
FIND_PACKAGE(OCCI REQUIRED)
INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${OCCI_INCLUDE_DIR})
SET(plugin_libs ${plugin_libs} ${OCCI_LIBRARIES})
IF(MSVC)
ADD_DEFINITIONS(/DPLUGIN_IMISIO) #it looks like some VC++ versions don't support -D syntax
ELSE(MSVC)
ADD_DEFINITIONS(-DPLUGIN_IMISIO)
ENDIF(MSVC)
SET(plugins_sources ${plugins_sources} plugins/ImisIO.cc)
ENDIF(PLUGIN_IMISIO)
IF(PLUGIN_PGMIO)
IF(MSVC)
ADD_DEFINITIONS(/DPLUGIN_PGMIO) #it looks like some VC++ versions don't support -D syntax
ELSE(MSVC)
ADD_DEFINITIONS(-DPLUGIN_PGMIO)
ENDIF(MSVC)
SET(plugins_sources ${plugins_sources} plugins/PGMIO.cc)
ENDIF(PLUGIN_PGMIO)
......@@ -134,32 +78,19 @@ IF(PLUGIN_PNGIO)
FIND_PACKAGE(PNG REQUIRED)
INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
SET(plugin_libs ${plugin_libs} ${PNG_LIBRARY})
IF(MSVC)
ADD_DEFINITIONS(/DPLUGIN_PNGIO) #it looks like some VC++ versions don't support -D syntax
ELSE(MSVC)
ADD_DEFINITIONS(-DPLUGIN_PNGIO)
ENDIF(MSVC)
SET(plugins_sources ${plugins_sources} plugins/PNGIO.cc)
ENDIF(PLUGIN_PNGIO)
IF(PLUGIN_SMETIO)
IF(MSVC)
ADD_DEFINITIONS(/DPLUGIN_SMETIO) #it looks like some VC++ versions don't support -D syntax
ELSE(MSVC)
ADD_DEFINITIONS(-DPLUGIN_SMETIO)
ENDIF(MSVC)
SET(plugins_sources ${plugins_sources} plugins/SMETIO.cc)
ENDIF(PLUGIN_SMETIO)
IF(PLUGIN_SNIO)
IF(MSVC)
ADD_DEFINITIONS(/DPLUGIN_SNIO) #it looks like some VC++ versions don't support -D syntax
ELSE(MSVC)
ADD_DEFINITIONS(-DPLUGIN_SNIO)
ENDIF(MSVC)
SET(plugins_sources ${plugins_sources} plugins/SNIO.cc)
ENDIF(PLUGIN_SNIO)
CONFIGURE_FILE( ${PROJECT_SOURCE_DIR}/meteoio/IOHandler.cmake.hpp ${PROJECT_SOURCE_DIR}/meteoio/IOHandler.h )
# IF(PLUGIN_GSNIO)
# INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} "/usr/include")
# #gsoap generates files that do lots of warnings, there is nothing we can do about it -> off
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment