Skip to content

Commit e438cc7

Browse files
authored
Merge pull request mdaus#795 from holmesv3/develop/version2
Develop/version2
2 parents 93e1231 + fb7d2ab commit e438cc7

File tree

1,366 files changed

+5052
-797045
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,366 files changed

+5052
-797045
lines changed

.github/workflows/build_unittest.yml

Lines changed: 25 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -6,142 +6,67 @@ on:
66
branches:
77
- main
88

9-
109
jobs:
1110
build-cmake-windows:
1211
strategy:
1312
matrix:
1413
os: [windows-latest]
15-
python-version: ['3.7']
16-
name: ${{ matrix.os }}-${{ matrix.python-version }}-CMake
14+
configuration: [Debug, Release]
15+
name: ${{ matrix.os }}-${{ matrix.configuration }}-CMake
1716
runs-on: ${{ matrix.os }}
1817
steps:
1918
- name: Skip Duplicate Actions
2019
uses: fkirc/skip-duplicate-actions@v5.3.1
2120
- uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
22-
- name: Set up Python
23-
uses: actions/setup-python@v5 # https://github.com/marketplace/actions/setup-python
24-
with:
25-
python-version: ${{ matrix.python-version }}
26-
- name: Install python dependencies
27-
run: |
28-
pip install numpy
2921
- name: configure
3022
run: |
3123
ls env:
32-
mkdir target-Release
33-
cd target-Release
34-
cmake .. -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github -DPYTHON_VERSION=${{ matrix.python-version }} -DENABLE_SWIG=ON
35-
cd ..
36-
mkdir target-Debug
37-
cd target-Debug
38-
cmake .. -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github -DENABLE_PYTHON=OFF
24+
mkdir target && cd target
25+
cmake .. -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github
3926
- name: build
4027
run: |
41-
cd target-Release
42-
cmake --build . --config Release -j
43-
cd ..
44-
cd target-Debug
45-
cmake --build . --config Debug -j
28+
cmake --build target --config ${{ matrix.configuration }} -j
4629
- name: test # should run w/o install
4730
run: |
48-
cd target-Release
49-
ctest -C Release --output-on-failure
50-
cd ..
51-
cd target-Debug
52-
ctest -C Debug --output-on-failure
31+
ctest --test-dir target -C ${{ matrix.configuration }} --output-on-failure
5332
- name: install
5433
run: |
55-
cd target-Release
56-
cmake --build . --config Release --target install
57-
cd ..
58-
cd target-Debug
59-
cmake --build . --config Debug --target install
60-
cd ..
61-
62-
build-msbuild-windows:
63-
strategy:
64-
matrix:
65-
os: [windows-latest]
66-
platform: [x64]
67-
configuration: [Debug] # Debug turns on more compiler warnings
68-
avx: [AVX512F]
69-
name: ${{ matrix.os }}-${{ matrix.avx }}-msbuild
70-
runs-on: ${{ matrix.os }}
71-
72-
steps:
73-
- name: Skip Duplicate Actions
74-
uses: fkirc/skip-duplicate-actions@v5.3.1
75-
- uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
76-
- name: configure
77-
run: |
78-
ls env:
79-
mkdir out
80-
cd out
81-
cmake .. -DCMAKE_INSTALL_PREFIX=install\${{ matrix.platform }}-${{ matrix.configuration }} -DENABLE_PYTHON=OFF -DENABLE_${{ matrix.avx }}=ON
82-
- name: build
83-
run: |
84-
cd out
85-
cmake --build . --config ${{ matrix.configuration }} -j
86-
cmake --build . --config ${{ matrix.configuration }} --target install
87-
- name: Add msbuild to PATH
88-
uses: microsoft/setup-msbuild@v1.1 # https://github.com/marketplace/actions/setup-msbuild
89-
with:
90-
msbuild-architecture: x64
91-
- name: msbuild
92-
run: |
93-
msbuild coda-oss.sln /p:configuration=${{ matrix.configuration }}
94-
# Can't figure out how to make this work :-(
95-
#- name: vstest
96-
# uses: microsoft/vstest-action@v1.0.0 # https://github.com/marketplace/actions/vstest-action
97-
# with:
98-
# testAssembly: UnitTest.dll
99-
# searchFolder: D:\a\nitro\nitro\${{ matrix.platform }}\${{ matrix.configuration }}
100-
# runInParallel: true
34+
cmake --install target --config ${{ matrix.configuration }}
10135
10236
build-linux-cmake-default:
10337
strategy:
10438
matrix:
105-
os: [ubuntu-22.04]
106-
python-version: ['3.7']
107-
name: ${{ matrix.os }}-${{ matrix.python-version }}-CMake
39+
os: [ubuntu-24.04]
40+
name: ${{ matrix.os }}-CMake
10841
runs-on: ${{ matrix.os }}
10942
steps:
11043
- name: Skip Duplicate Actions
11144
uses: fkirc/skip-duplicate-actions@v5.3.1
11245
- uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
113-
- name: Set up Python
114-
uses: actions/setup-python@v5 # https://github.com/marketplace/actions/setup-python
46+
- name: Setup Cpp
47+
uses: aminya/setup-cpp@v1 # https://github.com/marketplace/actions/setup-cpp-c-c
11548
with:
116-
python-version: ${{ matrix.python-version }}
117-
- name: Install python dependencies
118-
run: |
119-
pip install numpy
49+
compiler: gcc-14
12050
- name: configure
12151
run: |
12252
env
123-
which python
12453
mkdir target && cd target
125-
cmake .. -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github -DPYTHON_VERSION=${{ matrix.python-version }} -DENABLE_SWIG=ON
54+
cmake .. -DCMAKE_INSTALL_PREFIX=install${{ matrix.os }}CMake-Github
12655
- name: build
12756
run: |
128-
cd target
129-
# "-j" spawns too many processes causing GCC to crash
130-
cmake --build . -j 12
57+
cmake --build target -j
13158
- name: test
13259
# should run w/o install
13360
run: |
134-
cd target
135-
ctest --output-on-failure
61+
ctest --test-dir target --output-on-failure
13662
- name: install
13763
run: |
138-
cd target
139-
cmake --build . --target install
64+
cmake --install target
14065
14166
build-linux-cmake:
14267
strategy:
14368
matrix:
144-
os: [ubuntu-22.04]
69+
os: [ubuntu-24.04]
14570
configuration: [Debug, Release]
14671
avx: [AVX512F]
14772
name: ${{ matrix.os }}-${{ matrix.configuration }}-${{ matrix.avx }}-CMake
@@ -150,58 +75,17 @@ jobs:
15075
- name: Skip Duplicate Actions
15176
uses: fkirc/skip-duplicate-actions@v5.3.1
15277
- uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
153-
- name: configure
154-
run: |
155-
mkdir out && cd out
156-
cmake .. -DENABLE_PYTHON=OFF -DENABLE_${{ matrix.avx }}=ON -DCMAKE_INSTALL_PREFIX=${{ matrix.configuration }}
157-
- name: build
158-
run: |
159-
cd out
160-
# "-j" spawns too many processes causing GCC to crash
161-
cmake --build . -j 12
162-
- name: test
163-
# should run w/o install
164-
run: |
165-
cd out
166-
ctest --output-on-failure
167-
168-
build-waf:
169-
strategy:
170-
matrix:
171-
os: [
172-
# BROKEN: windows-latest,
173-
ubuntu-22.04]
174-
python-version: ['3.7']
175-
debugging: ['--enable-debugging', '']
176-
name: ${{ matrix.os }}-${{ matrix.python-version }}-waf${{ matrix.debugging }}
177-
runs-on: ${{ matrix.os }}
178-
steps:
179-
- name: Skip Duplicate Actions
180-
uses: fkirc/skip-duplicate-actions@v5.3.1
181-
- uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
182-
- name: Set up Python
183-
uses: actions/setup-python@v5 # https://github.com/marketplace/actions/setup-python
78+
- name: Setup Cpp
79+
uses: aminya/setup-cpp@v1 # https://github.com/marketplace/actions/setup-cpp-c-c
18480
with:
185-
python-version: ${{ matrix.python-version }}
186-
- name: configure_with_swig
187-
if: ${{ matrix.os == 'ubuntu-22.04' }}
188-
run: |
189-
pip install numpy
190-
mkdir install${{ matrix.os }}Waf-Github
191-
python waf configure --prefix="$PWD/install${{ matrix.os }}Waf-Github" --enable-swig ${{ matrix.debugging }}
192-
- name: configure_without_swig
193-
if: ${{ matrix.os == 'windows-latest' }}
81+
compiler: gcc-14
82+
- name: configure
19483
run: |
195-
pip install numpy
196-
mkdir install${{ matrix.os }}Waf-Github
197-
python waf configure --prefix="$PWD/install${{ matrix.os }}Waf-Github" ${{ matrix.debugging }}
84+
mkdir target && cd target
85+
cmake .. -DENABLE_${{ matrix.avx }}=ON -DCMAKE_INSTALL_PREFIX=${{ matrix.configuration }} -DCMAKE_BUILD_TYPE=${{ matrix.configuration }}
19886
- name: build
19987
run: |
200-
python waf build
201-
- name: install
202-
run: |
203-
python waf install
88+
cmake --build target -j
20489
- name: test
20590
run: |
206-
python waf install --alltests
207-
91+
ctest --test-dir target --output-on-failure

.gitignore

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ __pycache__/
77
install/
88
install-*/
99
target/
10+
build/
1011

1112
# Conan
1213
modules/drivers/**/build
@@ -21,14 +22,8 @@ Makefile
2122
modules/**/Makefile
2223
out/
2324
CMakeSettings.json
24-
25-
# Waf
26-
.waf-*
27-
waf-*
28-
.waf3-*
29-
waf3-*
30-
.lock-waf*
31-
build/waf*/
25+
# Ref: https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html
26+
CMakeUserPresets.json
3227

3328
# Eclipse
3429
.project
@@ -52,5 +47,8 @@ project.sln
5247
**/x64/
5348
*.vcxproj.user
5449

50+
# VSCode
51+
.vscode/
52+
5553
# Unit-tests
5654
TEST_*_TMP*.*

CMakeLists.txt

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#
33
# Author: Scott A. Colcord
44

5-
cmake_minimum_required(VERSION 3.14)
6-
project(coda-oss VERSION 1.0.0)
5+
cmake_minimum_required(VERSION 3.26)
6+
project(coda-oss VERSION 2.0.0 LANGUAGES C CXX)
77

88
if (EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
99
# build and package with conan
@@ -13,20 +13,24 @@ if (EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
1313
include("${CMAKE_BINARY_DIR}/conan_paths.cmake")
1414
endif()
1515

16+
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
17+
message(FATAL_ERROR "CODA-OSS require at least gcc-14")
18+
endif()
19+
1620
if (${CMAKE_PROJECT_NAME} STREQUAL coda-oss)
1721
# this is the top level project
1822

19-
# Allow other project to set different standard.
20-
set(CMAKE_CXX_STANDARD 14)
23+
# Only set std if not used as library
24+
set(CMAKE_CXX_STANDARD 23)
2125
set(CXX_STANDARD_REQUIRED true)
2226

2327
# Always turn on "warnings as errors" to avoid lots of (meaningless?) build output;
2428
# we'll dial-back warnings as necessary.
2529
if (MSVC)
26-
add_compile_options(/WX) # warnings as errors
27-
add_compile_options(/MP) # multi-processor compile
30+
# No warnings as errors for MSVC
31+
add_compile_options(/MP) # multi-processor compile
2832
elseif (UNIX)
29-
add_compile_options(-Werror) # warnings as errors
33+
add_compile_options(-Werror) # warnings as errors
3034
endif()
3135

3236
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
@@ -44,14 +48,15 @@ if (${CMAKE_PROJECT_NAME} STREQUAL coda-oss)
4448
include(CMakePackageConfigHelpers)
4549
write_basic_package_version_file(${version_file} VERSION ${CMAKE_PROJECT_VERSION} COMPATIBILITY SameMajorVersion)
4650
install(FILES ${version_file} DESTINATION "lib/cmake")
47-
51+
52+
# As opposed to drivers, these are "required" third-party packages
53+
add_subdirectory(externals)
54+
4855
endif()
4956

5057
add_subdirectory("modules")
5158

5259
# generate package config, with the following paths exported
5360
set(JARS_DIR ${CODA_STD_PROJECT_LIB_DIR} CACHE INTERNAL
5461
"path to installed jars, needed by downstream projects")
55-
set(SWIG_INCLUDE_DIR "${CODA_STD_PROJECT_INCLUDE_DIR}/swig" CACHE INTERNAL
56-
"path to installed SWIG includes, needed by downstream projects")
57-
coda_generate_package_config(JARS_DIR SWIG_INCLUDE_DIR)
62+
coda_generate_package_config(JARS_DIR)

0 commit comments

Comments
 (0)