CMake style

This commit is contained in:
Shahram Najm 2020-03-26 14:21:56 +00:00
parent 56ad3dbe72
commit a8e29e46d2
4 changed files with 25 additions and 27 deletions

View File

@ -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

View File

@ -23,14 +23,13 @@ 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})
DESTINATION ${ECCODES_DEFINITION_SUFF} )
install( DIRECTORY ${dirlist}
DESTINATION ${ECCODES_DEFINITION_SUFF}
@ -41,7 +40,6 @@ if(HAVE_INSTALL_ECCODES_DEFINITIONS)
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,7 +53,7 @@ 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
#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"

View File

@ -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" )

View File

@ -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)