mirror of https://github.com/ecmwf/eccodes.git
CMake style
This commit is contained in:
parent
56ad3dbe72
commit
a8e29e46d2
|
@ -21,7 +21,7 @@ if( ENABLE_EXTRA_TESTS )
|
|||
endif()
|
||||
|
||||
# Copy other files - e.g. reference data, text files etc from the source data dir
|
||||
LIST(APPEND other_files
|
||||
list(APPEND other_files
|
||||
60_model_levels
|
||||
bitmap.diff
|
||||
ieee_test.good
|
||||
|
|
|
@ -23,25 +23,23 @@ foreach( child ${children} )
|
|||
endif()
|
||||
endforeach()
|
||||
|
||||
if(HAVE_INSTALL_ECCODES_DEFINITIONS)
|
||||
|
||||
if( HAVE_INSTALL_ECCODES_DEFINITIONS )
|
||||
install( FILES ${definition_files} ${table_files} ${text_files}
|
||||
DESTINATION ${ECCODES_DEFINITION_SUFF}
|
||||
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ )
|
||||
|
||||
install( FILES installDefinitions.sh
|
||||
DESTINATION ${ECCODES_DEFINITION_SUFF})
|
||||
|
||||
install( DIRECTORY ${dirlist}
|
||||
DESTINATION ${ECCODES_DEFINITION_SUFF}
|
||||
FILES_MATCHING
|
||||
PATTERN "*.def"
|
||||
PATTERN "*.txt"
|
||||
PATTERN "*.list"
|
||||
PATTERN "*.table"
|
||||
PATTERN "4.2.192.*.table" EXCLUDE
|
||||
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ )
|
||||
DESTINATION ${ECCODES_DEFINITION_SUFF} )
|
||||
|
||||
install( DIRECTORY ${dirlist}
|
||||
DESTINATION ${ECCODES_DEFINITION_SUFF}
|
||||
FILES_MATCHING
|
||||
PATTERN "*.def"
|
||||
PATTERN "*.txt"
|
||||
PATTERN "*.list"
|
||||
PATTERN "*.table"
|
||||
PATTERN "4.2.192.*.table" EXCLUDE
|
||||
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ )
|
||||
endif()
|
||||
|
||||
# link to the definitions. See GRIB-786
|
||||
|
@ -55,11 +53,11 @@ endif()
|
|||
# copy the definitions to the build directory
|
||||
#file( COPY ${definition_files} ${table_files} ${text_files}
|
||||
# DESTINATION ${CMAKE_BINARY_DIR}/${ECCODES_DEFINITION_SUFF} )
|
||||
#file( COPY budg bufr cdf common grib1 grib2 grib3 gts mars metar tide hdf5 wrap
|
||||
# DESTINATION ${CMAKE_BINARY_DIR}/${ECCODES_DEFINITION_SUFF}
|
||||
# FILES_MATCHING
|
||||
# PATTERN "*.def"
|
||||
# PATTERN "*.txt"
|
||||
# PATTERN "*.list"
|
||||
# PATTERN "*.table"
|
||||
# PATTERN "4.2.192.*.table" EXCLUDE )
|
||||
#file(COPY budg bufr cdf common grib1 grib2 grib3 gts mars metar tide hdf5 wrap
|
||||
# DESTINATION ${CMAKE_BINARY_DIR}/${ECCODES_DEFINITION_SUFF}
|
||||
# FILES_MATCHING
|
||||
# PATTERN "*.def"
|
||||
# PATTERN "*.txt"
|
||||
# PATTERN "*.list"
|
||||
# PATTERN "*.table"
|
||||
# PATTERN "4.2.192.*.table" EXCLUDE )
|
||||
|
|
|
@ -58,8 +58,7 @@ if( HAVE_FORTRAN )
|
|||
add_custom_command( TARGET eccodes_f90 POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_Fortran_MODULE_DIRECTORY}/${CMAKE_CFG_INTDIR}/eccodes.mod ${CMAKE_BINARY_DIR}/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_Fortran_MODULE_DIRECTORY}/${CMAKE_CFG_INTDIR}/grib_api.mod ${CMAKE_BINARY_DIR}/include
|
||||
)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_Fortran_MODULE_DIRECTORY}/${CMAKE_CFG_INTDIR}/grib_api.mod ${CMAKE_BINARY_DIR}/include )
|
||||
|
||||
# Add the eccodes module file as well
|
||||
#set(_eccodes_mod "${CMAKE_Fortran_MODULE_DIRECTORY}/eccodes.mod" )
|
||||
|
|
|
@ -12,9 +12,10 @@ add_custom_command(
|
|||
${PROJECT_SOURCE_DIR}/samples
|
||||
${PROJECT_SOURCE_DIR}/ifs_samples
|
||||
${CMAKE_CURRENT_BINARY_DIR}/memfs.c
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/memfs.py )
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/memfs.py)
|
||||
|
||||
set_source_files_properties( ${CMAKE_CURRENT_BINARY_DIR}/memfs.c PROPERTIES OBJECT_DEPENDS
|
||||
set_source_files_properties(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/memfs.c PROPERTIES OBJECT_DEPENDS
|
||||
"${PROJECT_SOURCE_DIR}/memfs.py"
|
||||
# "${PROJECT_SOURCE_DIR}/memfs.py" ${definition_files}"
|
||||
)
|
||||
|
@ -25,7 +26,7 @@ if( CMAKE_C_COMPILER_ID MATCHES Cray )
|
|||
string( REGEX REPLACE "-g|-G[ 0-3]" " " CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_CAPS} "${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_CAPS}}" )
|
||||
endif()
|
||||
|
||||
if (HAVE_MEMFS)
|
||||
if( HAVE_MEMFS )
|
||||
ecbuild_add_library(TARGET eccodes_memfs
|
||||
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/memfs.c
|
||||
GENERATED ${CMAKE_CURRENT_BINARY_DIR}/memfs.c)
|
||||
|
|
Loading…
Reference in New Issue