Skip to content

CMake Build System#2527

Merged
WhoBrokeTheBuild merged 65 commits intoMDSplus:alphafrom
WhoBrokeTheBuild:cmake
Oct 2, 2025
Merged

CMake Build System#2527
WhoBrokeTheBuild merged 65 commits intoMDSplus:alphafrom
WhoBrokeTheBuild:cmake

Conversation

@WhoBrokeTheBuild
Copy link
Member

No description provided.

@WhoBrokeTheBuild WhoBrokeTheBuild self-assigned this Jan 31, 2023
@WhoBrokeTheBuild WhoBrokeTheBuild marked this pull request as draft January 31, 2023 07:00
@WhoBrokeTheBuild WhoBrokeTheBuild added feature Indicates new feature requests or implementations build Relates to the build system labels Apr 6, 2023
@dgarnier

This comment was marked as outdated.

WhoBrokeTheBuild and others added 7 commits September 29, 2025 13:11
Include previously bootstrap-generated mdsconfig.h.in

Add running of deploy/yylex.gen to CMake

Wrap JavaMds in IF(ENABLE_JAVA)

Fix link in MdsObjectsCppShr s/JavaMds/MdsIpShr/g

WIP CMake
Lowercase all of the CMake functions
Handle BUILD_SHARED_LIBS=OFF
Add HDF5

WIP CMake
Refactoring and standardization
Moved LIBXYZ variables into FindXYZ packages
Standardize all the FindXYZ scripts
Fix the manifest warnings from fat_jar()
Replace deploy/yylex.gen with explicit foreach loops
Replace tdishr/yylex/TdiHash.gen with TdiHash.py
Move *.y and *.l files out of yylex subdirectories
Remove conf/
Start work on CMakeMigrationGuide
Convert opcbuiltins.h to opcodes.csv
Generate opcbuiltins.h with opcbuiltins.py
Generate TdiHash.c from opcodes.csv
Comments, cleanup, refactoring
Make liblzma and git submodule update optional

Refactor how files are generated, prefix gen-
Add opcode number to opcodes.csv
(No longer rely on the line number)
Temporarily remove git submodule update

Rename gen_ file. Refactor gen_compound. Add CMakeLists

Fix broken opcodes.csv

WIP

Add missing SetEnvironmentForTests
Add clangd's .cache/ to gitignore
Comment out unused tests for LabView
Add __attribute__((unused)) to help compile with newer compilers
* Finish reinstating bootstrap

* fix type compatibility when compiling with Intel Fortran (ifort)

* enable building with Intel Fortran

* Add rpath functionality to remove dependence on LD_LIBRARY_PATH

fix install prefix in rpath

* Fix broken CMake 3.24 FindJNI on MacOS.  Also allow JDK version setting on MacOS.

* Fix use defined CACHE variable LIBXML2_DIR

* fix allowing ENABLE_IDL=OFF to work when IDL is not on host

* silence unused but set warning (+1 squashed commit)
Squashed commits:
[1c4dde515] TdiMath1.c scalars set but not used warning.  Noop use inserted (because we don't yet have C23 and [[mabye-unused]] attribute.)

* Darwin namespace collision avoided with ensureing _POSIX_C_SOURCE

* testing fixes for MacOS (+1 squashed commit)
Squashed commits:
[6798c3ff4] fix name collision in UdpEventsTest on macos

* change python setup to work with newer setuptools

* improve FreeTDS/Sybase support

* fix labview headers for newer macos compatibility

* change sprintf to snprintf for gcc12 warnings

* testing udp events in parallel leads to false error

* testing on MacOS does not require unavailable librt

* don't rely on dynamic linking in mitdevicesio

* Missing links I think should be correct.

* MacOS, prefer path python over system python

* Allow fixed link of MacOS tdic instead of broken module TdiShr

---------

Co-authored-by: Stephen Lane-Walsh <slwalsh@psfc.mit.edu>
Rewrite bootstrap in python
Move gen-* scripts back to deploy
Remove argparse in favor of constants
Add more verbose output
Replace os.walk with glob.glob in gen-messages
Rename gen-* scripts to be more explicit
Remove old CMake code that was intended to replace bootstrap
Add CMake code to run bootstrap if it hasn't already been run
Set C/C++ Standard, Add ENABLE_LABVIEW

Re-enable auto git submodule update, which may cause problems

Add a first pass at running Java Tests

Add mdsplus-api Java tests as well

Add tests for tditest, small fixes / cleanup

Now with C++ tests!

Fixes for tests
Fix py-task-do because it actually found an error!

Fixes for python and java tests
We now respect $PYTHON and try to use that version for scripts and $PyLib

Turn $PYTHON into -DPYTHON, and have it default to $PYTHON

Rehaul testing, work on Java
Add mdsplus_add_test to wrap all calls to add_test
This sets the environment variables and allows for defaults
Java testing works, but isn't great

Check for `FAILED` in the test output to catch the python failures
Add main/subtree paths to test environment specifications
Move the sanitizers back to redhat, as `/bin/sh` on Debian/Ubuntu segfaults when used with `LD_PRELOAD=tsan.so`
Add support for comments in the .opts files to document this ^
Improve the test summary in build.py when using a test regex
Rewrite {platform}_publish.py scripts to accept --release-dir, --publish-dir and --cert-dir instead of hardcoding /release, /publish, and /sign_keys
Update macosx-homebrew to use just "homebrew" as the --distname
Update macosx-macports to use just "macports" as the --distname
Update build.py to copy the tar of `install/usr/local/mdsplus` into the dist dir for macosx
@mwinkel-dev
Copy link
Contributor

I have perused the 343 files changed by this work-in-progress PR and didn't see anything alarming. This high-level review confirmed that the changes are in the expected categories (Jenkins build scripts, CMake scripts, tests, environment variables, platforms, generation scripts, removing obsolete files, etcetera). With such a large PR, there could of course be some overlooked bugs. However, the risk of that is low because testing apparently shows that this CMake PR does build on many platforms and the resulting MDSplus does pass the automated test suite. Thus, if there are overlooked bugs, they are likely minor and thus should be easy to fix after this PR is eventually merged.

Move over AdminList from alpha Jenkinsfile
Move over options and triggers from alpha Jenkinsfile
Move over commented-out sections that we will need from the alpha Jenkinsfile
@WhoBrokeTheBuild WhoBrokeTheBuild marked this pull request as ready for review October 2, 2025 20:48
@WhoBrokeTheBuild WhoBrokeTheBuild requested review from mwinkel-dev and santorofer and removed request for santorofer October 2, 2025 20:48
mwinkel-dev
mwinkel-dev previously approved these changes Oct 2, 2025
Copy link
Contributor

@mwinkel-dev mwinkel-dev left a comment

Choose a reason for hiding this comment

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

I have also reviewed the two commits made after my previous post. Those commits also look reasonable, so am approving this PR.

Add fake bootstrap as to not break existing workflows
@WhoBrokeTheBuild WhoBrokeTheBuild changed the title WIP CMake Build System CMake Build System Oct 2, 2025
mwinkel-dev
mwinkel-dev previously approved these changes Oct 2, 2025
Copy link
Contributor

@mwinkel-dev mwinkel-dev left a comment

Choose a reason for hiding this comment

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

The last commit has three minor changes:

  1. Bootstrap script for backwards compatibility for people used to the old build scripts.
  2. Deletion of extraneous printf() statements.
  3. Removal of an obsolete file.

All looks good, so approving this PR.

Copy link
Contributor

@mwinkel-dev mwinkel-dev left a comment

Choose a reason for hiding this comment

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

Most recent commit has a retry loop for downloading the Java library that implements SSH in Java programs (aka jsch.jar). Plus a minor formatting change in the CMakeLists.txt file.

The changes are straightforward, so approving this PR.

@WhoBrokeTheBuild WhoBrokeTheBuild merged commit f11259d into MDSplus:alpha Oct 2, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Relates to the build system feature Indicates new feature requests or implementations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants