-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed 'externals/nitro/' changes from d172d74a7..038069b2e
038069b2e Merge pull request #199 from mdaus/cmake-integration2 83efec019 Fix another Github Action runner issue. c1624a252 Fix CMake issues for Github action runners. 9de7b7826 Clean up and document CMake build changes 8947c15b4 Merge branch 'master' into cmake-integration2 d05822e9c Merge pull request #198 from mdaus/sync-externals 34b538e15 Merge commit '1262718741583c73dbf27057a7c322ea1fac0fae' into sync-externals 126271874 Squashed 'externals/coda-oss/' changes from 312e46dc..67d6362b 6a1b1946c Remove some unneeded coda-oss files 86598e258 Disable some unused parts of coda-oss a181098c5 Update Github Actions workflows for recent CMake changes. 48e620397 Update and refactor CMake and Conan build configurations 06be9b568 Fix Conan issues on Windows b7a62f5f0 Refactor Conan configuration and add test_package. 9a7688da6 Add preliminary Conan support. dfe87215d Refactor CMake build. 6732f92a0 Integrate with coda-oss CMake build. 800953f46 Merge commit 'df7acfb8e80f33d2f04d0ec8c4efbd8b2317826f' df7acfb8e Squashed 'externals/coda-oss/' changes from e26a32d6..312e46dc 9a8f5fe13 Merge pull request #197 from mdaus/bug/badly_configured_windows_path 793555754 Escape backslahes in Windows path 445c1e260 Merge pull request #195 from mdaus/bug/des_memory_leak 2906a6384 Check in Python3 bindings 4293cc465 Formatting aa3455aac Merge pull request #190 from mdaus/bug/failing_ctors 8c7b5c7fa Better error checking c545a423f Merge pull request #191 from mdaus/missing_field_error_message aead30a84 Include TRE field name in error message 32e8e23be Formatting 627c183d2 typo cabca936d Simplify error handling 2d0bb8ab7 Formatting 7f8794c37 Merge pull request #187 from mdaus/bug/tre_numeric_overflow 251bde556 Merge pull request #183 from mdaus/tre_memory_leak d1ab7ec53 Merge pull request #185 from mdaus/bug/set_binary_tre_field 67b50288e Handle too many decimals when setting float value for TRE field d4776de1c Use error member 86528d669 Uncomment test a4d1acc34 Allow setField to work with binary TRE fields 0e0b0dac0 Fix memory leak git-subtree-dir: externals/nitro git-subtree-split: 038069b2eaea59819e6486238babfb94ead3cdda
- Loading branch information
Showing
112 changed files
with
5,124 additions
and
1,504 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,60 @@ | ||
name: Build, unittest, compress | ||
|
||
on: | ||
on: | ||
push: | ||
branches: master | ||
pull_request: | ||
branches: master | ||
|
||
|
||
jobs: | ||
build-windows: | ||
name: Windows | ||
runs-on: [windows-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.7' | ||
- name: configure | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake -DCMAKE_INSTALL_PREFIX=installWindows-Github .. | ||
cmake -DCMAKE_INSTALL_PREFIX=installWindows-Github -DPYTHON_VERSION="3.7" .. | ||
- name: make | ||
run: | | ||
cd build | ||
cmake --build . -j | ||
cmake --build . --target install | ||
cmake --build . --config Release -j | ||
cmake --build . --config Release --target install | ||
- name: test | ||
run: | | ||
cd build | ||
ctest | ||
ctest -C Release | ||
- name: compress | ||
run: Compress-Archive -DestinationPath installWindows-Github.zip -Path build/installWindows-Github | ||
- name: Upload artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: windows_install | ||
path: installWindows-Github.zip | ||
|
||
build-linux: | ||
name: Linux | ||
runs-on: [ubuntu-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.7' | ||
- name: configure | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake -DCMAKE_INSTALL_PREFIX=installLinux-Github .. | ||
cmake -DCMAKE_INSTALL_PREFIX=installLinux-Github -DPYTHON_VERSION=3.7 .. | ||
- name: make | ||
run: | | ||
cd build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
# Build artifacts | ||
target/ | ||
test_package/build/ | ||
*.pyc | ||
*.swp | ||
.depproj | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,50 @@ | ||
# CODA_OSS uses FetchContent, which requires 3.11, in the zlib build | ||
# It might be possible to rework if this has to work with older CMakes | ||
cmake_minimum_required(VERSION 3.11) | ||
|
||
project("nitro") | ||
|
||
include(common_build.cmake) | ||
|
||
if(PYTHON_HOME) | ||
set(Python_ROOT_DIR ${PYTHON_HOME}) | ||
endif() | ||
|
||
find_package(Python COMPONENTS Interpreter Development NumPy) | ||
list(APPEND coda_modules except-c++ io-c++ sys-c++ mt-c++ str-c++ | ||
math-c++ xml.lite-c++ JPEG J2K) | ||
|
||
if (Python_NumPy_FOUND AND NOT MSVC) | ||
list(APPEND coda_modules numpyutils-c++) | ||
endif() | ||
if (Python_FOUND) | ||
set(PYTHON ${Python_EXECUTABLE}) | ||
else() | ||
set(PYTHON python) | ||
cmake_minimum_required(VERSION 3.14) | ||
project(nitro) | ||
|
||
set(CMAKE_C_STANDARD 90) | ||
set(CMAKE_CXX_STANDARD 11) | ||
|
||
if (${CMAKE_PROJECT_NAME} STREQUAL nitro) | ||
# we are the top-level project and are responsible for configuration | ||
|
||
# set up warnings | ||
if (MSVC) | ||
# set warning level to /W3 | ||
string(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") | ||
string(REGEX REPLACE "/W[0-4]" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") | ||
add_compile_options(/W3 /wd4290 /wd4512) | ||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS) | ||
elseif (UNIX) | ||
add_compile_options( | ||
-Wno-deprecated | ||
-Wno-unused-value | ||
-Wno-unused-but-set-variable | ||
) | ||
endif() | ||
|
||
if (EXISTS "${CMAKE_BINARY_DIR}/conan_paths.cmake") | ||
# use pre-built coda-oss from conan package | ||
include("${CMAKE_BINARY_DIR}/conan_paths.cmake") | ||
find_package(coda-oss REQUIRED) | ||
include(CodaBuild) | ||
coda_initialize_build() | ||
else() | ||
# build coda-oss ourselves | ||
|
||
# disable some unneeded drivers from coda-oss | ||
set(ENABLE_PCRE OFF CACHE BOOL "enable PCRE library" FORCE) | ||
set(ENABLE_UUID OFF CACHE BOOL "enable uuid library" FORCE) | ||
set(ENABLE_ZIP OFF CACHE BOOL "enable ZIP library" FORCE) | ||
|
||
list(APPEND CMAKE_MODULE_PATH | ||
"${CMAKE_CURRENT_SOURCE_DIR}/externals/coda-oss/cmake") | ||
include(CodaBuild) | ||
coda_initialize_build() | ||
add_subdirectory("externals/coda-oss") | ||
endif() | ||
endif() | ||
|
||
if (NOT DEFINED CODA_INSTALL_DIR) | ||
include(CMakeLists-CODA.txt) | ||
else() | ||
add_library(coda-oss INTERFACE) | ||
endif() | ||
|
||
foreach(module ${coda_modules}) | ||
add_coda_module(${module}) | ||
endforeach() | ||
|
||
add_library(coda_oss_config INTERFACE) | ||
target_include_directories(coda_oss_config INTERFACE ${CODA_DIR}/target/moudules/c++/config/include/) | ||
add_dependencies(coda_oss_config coda-oss) | ||
|
||
# Everyone can include coda's headers | ||
include_directories(${CODA_INSTALL_DIR}/include) | ||
|
||
enable_testing() | ||
set(NITRO_C_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/modules/c) | ||
add_subdirectory(modules/c) | ||
add_subdirectory(modules/c++) | ||
if (NOT MSVC) | ||
add_subdirectory(modules/python) | ||
endif() | ||
add_subdirectory(modules/java) | ||
add_subdirectory(modules/mex) | ||
add_subdirectory("modules") | ||
|
||
coda_generate_package_config() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@PACKAGE_INIT@ | ||
|
||
# import coda-oss targets from its package | ||
include(CMakeFindDependencyMacro) | ||
find_dependency(coda-oss) | ||
|
||
# import nitro targets | ||
include("${CMAKE_CURRENT_LIST_DIR}/nitroTargets.cmake") |
Oops, something went wrong.