Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libcdi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpim-sw
libcdi
Commits
044a691f
Commit
044a691f
authored
7 months ago
by
Oliver Heidmann
Committed by
Uwe Schulzweida
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
cmake now working on levante
parent
a1ee4950
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!105
Develop
,
!104
M300433/netcdf memory read write
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+27
-14
27 additions, 14 deletions
CMakeLists.txt
app/CMakeLists.txt
+1
-1
1 addition, 1 deletion
app/CMakeLists.txt
src/CMakeLists.txt
+2
-0
2 additions, 0 deletions
src/CMakeLists.txt
with
30 additions
and
15 deletions
CMakeLists.txt
+
27
−
14
View file @
044a691f
...
...
@@ -4,26 +4,39 @@
cmake_minimum_required
(
VERSION 3.12 FATAL_ERROR
)
project
(
cdi VERSION 2.4.0 LANGUAGES C
)
project
(
lib
cdi VERSION 2.4.0 LANGUAGES C
)
set
(
CMAKE_C_STANDARD 11
)
include
(
CheckIncludeFile
)
configure_file
(
"
${
PROJECT_SOURCE_DIR
}
/cmake/cdi_config.h.in"
"
${
PROJECT_
BINARY
_DIR
}
/config.h"
"
${
PROJECT_
SOURCE
_DIR
}
/
src/
config.h"
)
include_directories
(
"
${
PROJECT_BINARY_DIR
}
"
)
list
(
APPEND CMAKE_MODULE_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake
)
find_package
(
NetCDF
)
find_package
(
hdf5 REQUIRED
)
if
(
hdf5_FOUND
)
message
(
STATUS
"HDF5 shaed found"
)
else
()
message
(
FATAL_ERROR
"HDF shared not found"
)
endif
()
#NetCDF
find_package
(
netCDF COMPONENTS C REQUIRED
)
set
(
netcdf_flag HAVE_LIBNETCDF
)
set
(
netcdf_flag
${
HAVE_LIBNETCDF
}
)
check_include_files
(
"netcdf.h"
${
netcdf_flag
}
C
)
if
(
${
netCDF_FOUND
}
)
message
(
STATUS
"added compile definition HAVE_LIBNETCDF=
${
netCDF_FOUND
}
"
)
add_compile_definitions
(
HAVE_LIBNETCDF=
${
netCDF_FOUND
}
)
else
()
message
(
WARNING
"netcdf not found, compiling without netcdf"
)
endif
()
set
(
HAVE_NETCDF
${
netCDF_FOUND
}
)
if
(
netCDF_FOUND
)
set
(
HAVE_NETCDF 1
)
endif
()
#adding subdirectories
## lib and general files
add_subdirectory
(
src
)
## cdi executable
add_subdirectory
(
app
)
add_subdirectory
(
src
)
add_subdirectory
(
app
)
#target_link_libraries(cdi PRIVATE NetCDF)
This diff is collapsed.
Click to expand it.
app/CMakeLists.txt
+
1
−
1
View file @
044a691f
...
...
@@ -7,6 +7,6 @@ target_include_directories(cdi PUBLIC
$<INSTALL_INTERFACE:include
)
target_link_libraries
(
cdi PUBLIC cdilib
)
target_link_libraries
(
cdi PUBLIC cdilib
netCDF::netcdf
${
HDF5_LIBS
}
pthread
)
target_compile_definitions
(
cdi PUBLIC HAVE_CONFIG_H
)
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
2
−
0
View file @
044a691f
...
...
@@ -142,5 +142,7 @@ add_library(cdilib
${
cdi_src_files
}
# INSTALL_HEADERS_LIST cdi.h
)
find_package
(
HDF5 REQUIRED COMPONENTS C REQUIRED
)
target_link_libraries
(
cdilib PUBLIC netCDF::netcdf
${
HDF5_LIBS
}
)
target_compile_definitions
(
cdilib PUBLIC HAVE_CONFIG_H
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment