mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Modified CMake configuration to fix some problems present on 64-bit linux.
This commit is contained in:
parent
51ff4c0ec6
commit
d24422c126
@ -2,7 +2,7 @@
|
||||
cmake_minimum_required(VERSION 2.8.8)
|
||||
|
||||
#Project Name
|
||||
project(NetCDF C CXX)
|
||||
project(NetCDF C)
|
||||
SET(NetCDF_VERSION 4.2.1)
|
||||
ENABLE_TESTING()
|
||||
INCLUDE(CTest)
|
||||
@ -147,9 +147,9 @@ IF(ENABLE_DISKLESS)
|
||||
ENDIF()
|
||||
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
|
||||
ENDIF()
|
||||
|
||||
# Option Logging, only valid for netcdf4.
|
||||
@ -317,10 +317,9 @@ ENDIF()
|
||||
# Provide the option to perform coverage tests.
|
||||
OPTION (ENABLE_COVERAGE_TESTS "Enable compiler flags needed to perform coverage tests." OFF)
|
||||
IF(ENABLE_COVERAGE_TESTS)
|
||||
#SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecated -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -W -profile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "-g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_EXE_LINKER_FLAGSx "-fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -Wall -W -profile-arcs -ftest-coverage")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -Wall -W -fprofile-arcs -ftest-coverage")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
|
||||
MESSAGE(STATUS "Coverage Tests: On.")
|
||||
ENDIF()
|
||||
|
||||
@ -527,12 +526,12 @@ IF(ENABLE_TESTS)
|
||||
ENDIF()
|
||||
|
||||
# Code to generate an export header
|
||||
GENERATE_EXPORT_HEADER(netcdf
|
||||
BASE_NAME netcdf
|
||||
EXPORT_MACRO_NAME netcdf_EXPORT
|
||||
EXPORT_FILE_NAME netcdf_Export.h
|
||||
STATIC_DEFINE netcdf_BUILT_AS_STATIC
|
||||
)
|
||||
#GENERATE_EXPORT_HEADER(netcdf
|
||||
# BASE_NAME netcdf
|
||||
# EXPORT_MACRO_NAME netcdf_EXPORT
|
||||
# EXPORT_FILE_NAME netcdf_Export.h
|
||||
# STATIC_DEFINE netcdf_BUILT_AS_STATIC
|
||||
#)
|
||||
|
||||
#####
|
||||
# Build doxygen documentation, if need be.
|
||||
|
@ -7,6 +7,8 @@ SET(ncgen3_FILES main.c load.c escapes.c getfill.c init.c genlib.c ncgentab.c)
|
||||
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.nc ${CMAKE_CURRENT_SOURCE_DIR}/*.sh ${CMAKE_CURRENT_SOURCE_DIR}/*.cdl)
|
||||
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE)
|
||||
|
||||
IF(NOT EXISTS ${NetCDF_SOURCE_DIR}/ncgen3/ncgentab.c AND NOT EXISTS
|
||||
${NetCDF_SOURCE_DIR}/ncgen3/ncgentab.h)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/ncgentab.c ${CMAKE_CURRENT_SOURCE_DIR}/ncgentab.h
|
||||
COMMAND bison -pncg -d ${NetCDF_SOURCE_DIR}/ncgen3/ncgen.y
|
||||
@ -14,7 +16,7 @@ ADD_CUSTOM_COMMAND(
|
||||
COMMAND mv ncgen.tab.h ${NetCDF_SOURCE_DIR}/ncgen3/ncgentab.h
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
ENDIF()
|
||||
IF(USE_X_GETOPT)
|
||||
SET(ncgen3_FILES ${ncgen3_FILES} XGetopt.c)
|
||||
ENDIF()
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.3. */
|
||||
/* A Bison parser, made by GNU Bison 2.5. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2009, 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
Loading…
Reference in New Issue
Block a user