Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 7 additions & 15 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: push

jobs:
build-cse:
name: Build CSE executable
name: Build and test CSE
runs-on: windows-2022
defaults:
run:
Expand All @@ -17,25 +17,17 @@ jobs:
submodules: recursive
- name: Build CSE
uses: ./.github/actions/build-cse
- name: Upload executable artifiact
- name: Build cse_tests.exe (unit tests)
run: cmake --build . --config Release --target cse_tests
working-directory: msvc/build
- name: Upload cse.exe artifact
uses: actions/upload-artifact@v3
with:
name: CSE.exe
path: msvc/CSE.exe
test-cse:
name: Test CSE
needs: build-cse
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v3.3.0
- name: Configure CMake
run: cmake -P cmake/configure.cmake
- name: Build wcmp and unit test executable
run: cmake --build . --config Release --target wcmp cse_tests
- name: Build wcmp executable
run: cmake --build . --config Release --target wcmp
working-directory: msvc/build
- name: Download CSE artifact
uses: ./.github/actions/download-cse-artifact
# - name: Setup Mesa3D
# uses: bigladder/github-actions/setup-mesa3d@main
# with:
Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 3.15.0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a necessary update?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMake stuff I've read recommends putting cmake-minimum_required as the first thing in the file, so I moved it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But no particular reason to upgrade to 3.15 from 3.10?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the change was inadvertent. I have done some reading in Professional CMake and noted many features added in 3.15 related to debugging, clang-on-Windows-support, and other things. Given that 3.15 is now 4 years old, it is not unreasonable to require it. In fact, I would advocate going much newer and learning how to exploit current features. We're a small group, it would not be a major inconvenience to move to a newer version.


# MSVC runtime library flags are selected by an abstraction.
cmake_policy(SET CMP0091 NEW) # MSVC runtime library flags are selected by an abstraction.
project(CSE)

cmake_minimum_required(VERSION 3.10.0)
project(CSE)

# target_link_libraries() allows use with targets in other directories. Set to new in 3.13 or higher.
cmake_policy(SET CMP0079 NEW)
Expand Down
12 changes: 2 additions & 10 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
add_library(cse_libstubs OBJECT libstubs.cpp)

target_include_directories(cse_libstubs PUBLIC
"${CMAKE_SOURCE_DIR}/src/RCDEF" # stubs don't need legit dtypes.h
"${CMAKE_SOURCE_DIR}/src"
)

target_compile_features(cse_libstubs PUBLIC cxx_std_17)
target_link_libraries(cse_libstubs PRIVATE cse_common_interface)

# cse/src CMakeLists.txt -- Build rcdef, run rcdef, build CSE

# Build RCDEF
add_subdirectory(RCDEF)
Expand Down Expand Up @@ -297,3 +288,4 @@ foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG_CAPS)
set_target_properties(CSE PROPERTIES RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG_CAPS} ${exeDir})
endforeach()

2 changes: 1 addition & 1 deletion src/CNRECS.DEF
Original file line number Diff line number Diff line change
Expand Up @@ -3941,7 +3941,7 @@ RECORD DHWMTR_IVL "DHW meter interval sub" *SUBSTRUCT // interval substruct for
*declare "float wmt_GetByEUX( DHWEUXCH eux) { return (&total)[ eux-1]; };"
*declare "void wmt_AccumEU( DHWEUCH eu, FLOAT v) { (&unknown)[ eu] += v; total += v; }"
*declare "void wmt_Accum( const DHWMTR_IVL* sIvl, int options=0, float mult=1.f);"
*declare "void wmt_AccumTo( double* useTots) const { VAccum( useTots, NDHWENDUSES+1, &total); }"
*declare "void wmt_AccumTo( double* useTots) const { VAccum( useTots, NDHWENDUSESPP+1, &total); }"
*declare "void wmt_SetPrior() const;"

FLOAT total // total of following specific end uses. Code assumes precedes them.
Expand Down
11 changes: 6 additions & 5 deletions src/RCDEF/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# RCDEF CMakeLists.txt

set(source
rcdef.cpp
../dmpak.cpp
../lookup.cpp
../dmpak.cpp
../messages.cpp
../msgtbl.cpp
../rmkerr.cpp
../strpak.cpp
../tdpak.cpp
../xiopak.cpp
../libstubs.cpp
)

set(headers
../cnglob.h
../lookup.h
../dmpak.h
dtypes.h
../messages.h
../rmkerr.h
../xiopak.h
Expand All @@ -24,8 +26,7 @@ include_directories(
..
)


add_executable(RCDEF ${source} ${headers})
target_compile_features(RCDEF PRIVATE cxx_std_17)
target_compile_definitions(RCDEF PRIVATE NOVRR)
target_compile_definitions(RCDEF PRIVATE NODTYPES)
target_link_libraries(RCDEF PRIVATE cse_common_interface)
Loading