Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KISS-111, add api for writing double variables with mesh locations #7

Merged
merged 10 commits into from
Mar 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 28 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ project(
DESCRIPTION "Library for reading/writing UGrid files."
LANGUAGES CXX C)

# Make sure all executables and shared libraries end up in one directory,
# otherwise the executables won't run under Windows. This will cause
# the build to fail.
set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")

# Create position independent binaries
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Require C++17
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Disable compiler specific extensions
set(CMAKE_CXX_EXTENSIONS OFF)
# Set cmake installation prefix, so UGrid library gets installed under /UGrid
SET(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/UGrid")

if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g -O2 -std=c++17")
Expand Down Expand Up @@ -54,15 +70,24 @@ endif()
find_package(Boost REQUIRED COMPONENTS system filesystem)
include_directories(${Boost_INCLUDE_DIR})

# Use NetCDF-cxx
find_package(netCDFCxx 4.3.1 REQUIRED)
if (NetCDFCxx_FOUND)
message(STATUS "NetCDFCXX include dirs: ${NetCDFCxx_INCLUDE_DIRS}")
endif()

# Use NetCDF
find_package(netCDF REQUIRED)
if (netCDF_FOUND)
message(STATUS "netCDF_LIB_DIR dirs: ${netCDF_LIB_DIR}")
endif()

# FetchContent added in CMake 3.11, downloads during the configure step
include(FetchContent)

# Run packaging scripts
add_subdirectory(package)

# The external library
add_subdirectory(extern)

# The version file
add_subdirectory(include/Version)

Expand All @@ -72,9 +97,6 @@ add_subdirectory(src/UGrid)
# The dynamic library
add_subdirectory(src/UGridApi)

# The path to netcdf libraries
set(NETCDF_PATH "${PROJECT_SOURCE_DIR}/extern/netcdf/netcdf_4_8_0")

# Testing only available if this is the main app.
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
add_subdirectory(tests)
Expand Down
41 changes: 0 additions & 41 deletions extern/CMakeLists.txt

This file was deleted.

106 changes: 0 additions & 106 deletions extern/hdf5/COPYING

This file was deleted.

169 changes: 0 additions & 169 deletions extern/hdf5/CTestScript.cmake

This file was deleted.

Loading