Warning, /graphics/kst-plot/cmake/3rdparty/netcdf/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 2.8)
0002 
0003 project(netcdf)
0004 
0005 if(netcdf_sources)
0006         set(TOP_DIR ${netcdf_sources})
0007 else()
0008         set(TOP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
0009 endif()
0010 
0011 
0012 if(netcdf_install_prefix)
0013         set(CMAKE_INSTALL_PREFIX ${netcdf_install_prefix} CACHE PATH "User's choice for install prefix" FORCE)
0014         set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
0015 endif()
0016 if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
0017         set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/INSTALLED CACHE PATH "Kst's default install prefix" FORCE)
0018 endif()
0019 
0020 message(STATUS)
0021 message(STATUS "Using netCDF sources from: ${TOP_DIR}")
0022 message(STATUS "Installing netCDF at    : ${CMAKE_INSTALL_PREFIX}")
0023 message(STATUS)
0024 
0025 if(MSVC)
0026         add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DNOMINMAX)
0027 
0028         # add here warnings which should produce an error /weXXXX
0029         set(MSVC_W_ERROR   "/we4101 /we4189")
0030         
0031         # add here warnings which should be disabled /wdXXXX
0032         set(MSVC_W_DISABLE "/wd4288 /wd4355 /wd4800 /wd4996 /wd4311 /wd4312 /wd4505 /wd4267 /wd4512 /wd4245 /wd4127 /wd4180 /wd4231")
0033 
0034         set(CMAKE_C_FLAGS_DEBUG
0035                 "${CMAKE_C_FLAGS_DEBUG} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
0036         set(CMAKE_C_FLAGS_RELEASE
0037                 "${CMAKE_C_FLAGS_RELEASE} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
0038         
0039         set(CMAKE_DEBUG_POSTFIX d)
0040         configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-msvc.h ${CMAKE_BINARY_DIR}/config.h COPYONLY)
0041         configure_file(${CMAKE_CURRENT_SOURCE_DIR}/inttypes.h ${CMAKE_BINARY_DIR}/inttypes.h COPYONLY)
0042         configure_file(${CMAKE_CURRENT_SOURCE_DIR}/stdint.h ${CMAKE_BINARY_DIR}/stdint.h COPYONLY)
0043 endif()
0044 
0045 if(MINGW)
0046         configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-mingw.h ${CMAKE_BINARY_DIR}/config.h COPYONLY)
0047 endif()
0048 
0049 add_definitions(-D_FILE_OFFSET_BITS=64) 
0050 include_directories(${CMAKE_BINARY_DIR})
0051 
0052 if (NOT CMAKE_INSTALL_PREFIX)
0053         set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/installed)
0054 endif()
0055 
0056 add_subdirectory(libsrc)
0057 add_subdirectory(cxx)
0058 
0059 
0060