WSL/SLF GitLab Repository

Commit a0389f84 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Lots of simplification in the CMakeLists (requirering cmake >=2.8.0) as well...

Lots of simplification in the CMakeLists (requirering cmake >=2.8.0) as well as a small documentation update
parent baae08c7
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/tools/cmake/")
# Version of library
......@@ -18,8 +18,12 @@ ADD_SUBDIRECTORY(meteoio)
###########################################################
#platform specific. First, compiler specific flags, then system specific flags
#SET(DEBUG_ARITHM ON CACHE BOOL "Force crash the application when doing an arithmetic exception")
OPTION( BUILD_SHARED_LIBS "Set to ON to build dynamic libraries" ON )
OPTION(BUILD_SHARED_LIBS "Set to ON to build dynamic libraries" ON)
IF(WIN32)
SET(BUILD_STATIC_LIBS ON) #otherwise the lib files are not generated
ELSE(WIN32)
OPTION(BUILD_STATIC_LIBS "Set to ON to build static libraries" OFF)
ENDIF(WIN32)
INCLUDE("${CMAKE_MODULE_PATH}/BuildVersion.cmake")
BuildVersion()
......@@ -51,6 +55,7 @@ ELSE(MSVC)
ENDIF(POPC)
IF(APPLE)
SET(EXTRA_WARNINGS "${EXTRA_WARNINGS} -Wno-sign-conversion -Wno-shorten-64-to-32") #for now, keep clang quiet
SET(EXTRA_LINK_FLAGS "-framework CoreFoundation")
ENDIF(APPLE)
IF(CMAKE_COMPILER_IS_GNUCXX AND NOT ANDROID)
SET(EXTRA_WARNINGS "${EXTRA_WARNINGS} -ansi") #Android does not like ansi...
......@@ -156,11 +161,6 @@ SET(PLUGIN_SMETIO ON CACHE BOOL "Compilation SMETIO ON or OFF")
SET(PLUGIN_SNIO ON CACHE BOOL "Compilation SNIO ON or OFF")
SET(PROJ4 OFF CACHE BOOL "Use PROJ4 for the class MapProj ON or OFF")
#some cmake specific things //HACK: should it not be in the plugin Cmake?
IF (GSOAPPP AND NOT EXISTS ${GSOAPPP})
SET(GSOAPPP NOTFOUND CACHE FORCE)
ENDIF(GSOAPPP AND NOT EXISTS ${GSOAPPP})
###########################################################
#for the install target
FILE(GLOB hfiles "meteoio/*.h")
......@@ -180,14 +180,6 @@ INSTALL(FILES ${hlawsfiles} DESTINATION include/meteoio/meteolaws COMPONENT head
INSTALL(FILES ${hfilterfiles} DESTINATION include/meteoio/meteofilters COMPONENT headers)
INSTALL(FILES ${hstatsfiles} DESTINATION include/meteoio/meteostats COMPONENT headers)
IF(WIN32) #handle the special case of WIN32 needing import libraries
FILE(GLOB_RECURSE importlibs "lib/libmeteo*.lib")
ENDIF(WIN32)
FILE(GLOB_RECURSE solibs "lib/libmeteo*.${DLL_EXT}")
FILE(GLOB_RECURSE alibs "lib/*.${STAT_EXT}")
INSTALL(FILES ${solibs} ${importlibs} ${alibs} DESTINATION lib COMPONENT libraries)
ADD_CUSTOM_TARGET(distclean make clean
COMMAND cmake -E remove CMakeCache.txt CPackSourceConfig.cmake CPackConfig.cmake CTestTestfile.cmake DartConfiguration.tcl cmake_install.cmake cmake_uninstall.cmake install_manifest.txt Makefile
COMMAND cmake -E remove "lib/libmeteo*.${DLL_EXT}" "lib/libmeteo*.${STAT_EXT}" "lib/libmeteo*.lib"
......@@ -403,8 +395,3 @@ IF(BUILD_TESTING)
INCLUDE(CTest) # This makes ENABLE_TESTING() and gives support for Dashboard
ADD_SUBDIRECTORY(tests)
ENDIF(BUILD_TESTING)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../../tools/cmake/")
PROJECT(meteoio_examples)
......
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/")
SET(LIBPREFIX "lib") #make sure ALL plugins are libXXX for ALL plateforms
SET(CMAKE_IMPORT_LIBRARY_PREFIX "lib") #for Visual C++ import libraries
OPTION( BUILD_SHARED_LIBS "Set to ON to build dynamic libraries" ON )
IF(WIN32)
#otherwise the lib files are not generated
SET(BUILD_STATIC_LIBS ON)
ELSE(WIN32)
OPTION( BUILD_STATIC_LIBS "Set to ON to build static libraries" OFF )
ENDIF(WIN32)
IF(APPLE)
SET(EXTRA_LINK_FLAGS "-framework CoreFoundation")
ENDIF(APPLE)
INCLUDE("${PROJECT_SOURCE_DIR}/meteoio/plugins/CMakeLists.txt")
INCLUDE("${PROJECT_SOURCE_DIR}/meteoio/meteolaws/CMakeLists.txt")
INCLUDE("${PROJECT_SOURCE_DIR}/meteoio/meteostats/CMakeLists.txt")
INCLUDE("${PROJECT_SOURCE_DIR}/meteoio/meteofilters/CMakeLists.txt")
IF(PROJ4)
FIND_PATH(LIBPROJ_INCLUDE_DIR "proj_api.h")
......@@ -24,11 +16,6 @@ IF(PROJ4)
ENDIF(MSVC)
ENDIF(PROJ4)
INCLUDE("${PROJECT_SOURCE_DIR}/meteoio/plugins/CMakeLists.txt")
INCLUDE("${PROJECT_SOURCE_DIR}/meteoio/meteolaws/CMakeLists.txt")
INCLUDE("${PROJECT_SOURCE_DIR}/meteoio/meteostats/CMakeLists.txt")
INCLUDE("${PROJECT_SOURCE_DIR}/meteoio/meteofilters/CMakeLists.txt")
IF(POPC)
#FIND_PACKAGE(Popc REQUIRED)
SET(popc_sources marshal_meteoio.cc)
......@@ -133,3 +120,8 @@ IF(BUILD_STATIC_LIBS)
COMPONENT libraries
)
ENDIF(BUILD_STATIC_LIBS)
IF(WIN32) #handle the special case of WIN32 needing import libraries
FILE(GLOB_RECURSE importlibs "lib/libmeteo*.lib")
INSTALL(FILES ${importlibs} DESTINATION lib COMPONENT libraries)
ENDIF(WIN32)
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/")
CONFIGURE_FILE( ${PROJECT_SOURCE_DIR}/meteoio/IOHandler.cmake.cc ${PROJECT_SOURCE_DIR}/meteoio/IOHandler.cc )
IF(PLUGIN_ARCIO)
SET(plugins_sources ${plugins_sources} plugins/ARCIO.cc)
ENDIF(PLUGIN_ARCIO)
......@@ -92,5 +94,3 @@ IF(PLUGIN_SNIO)
SET(plugins_sources ${plugins_sources} plugins/SNIO.cc)
ENDIF(PLUGIN_SNIO)
CONFIGURE_FILE( ${PROJECT_SOURCE_DIR}/meteoio/IOHandler.cmake.cc ${PROJECT_SOURCE_DIR}/meteoio/IOHandler.cc )
......@@ -69,7 +69,8 @@ namespace mio {
* When a grid is read by providing the filename to open, any file name will obviously work. Otherwise, the file names have to follow the pattern:\n
* {GRID2DPREFIX}{ISO8601 numerical UTC date}{GRID2DEXT}\n
* By default, GRID2DPREFIX is empty and GRID2DEXT is ".grb". This means that by default, a grib file containing data for 2013-10-15T12:00 would be:
* "201310151200.grb". Since the grid extension contains the ".", it is possible to use it for a file name suffix as well.
* "201310151200.grb". Since the grid extension contains the ".", it is possible to use it for a file name suffix as well. For example, to read files
* named like "lfff201310151200_z" one would provide GRID2DPREFIX="lfff" and GRID2DEXT="_z".
*
* @section gribio_keywords Keywords
* This plugin uses the following keywords:
......
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