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

CMake Option for Compiling Commandline Utilities #722

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

carlos-pereyra
Copy link
Contributor

@carlos-pereyra carlos-pereyra commented Jun 22, 2023

Added a new CMake option which enables the build of command line utilities (e.g. cgns_to_plot3d, cgns_to_aflr3, etc.) without having to build the entire cgnstools suite. This avoids Tk/Tcl issues, especially for folks on Mac OS X and solely want to use the command line utilities without compiling the old-school fortran conversion scripts.

Example build case would look like:
cd CGNS/
mkdir build
cmake .. -DCGNS_ENABLE_UTILS=ON
...
make -j4

…ENABLE_UTILS`` option. Other cmake updates include automatically searching for opengl on system.
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
carlos-pereyra and others added 2 commits June 22, 2023 08:35
Co-authored-by: Mickael PHILIT <mickey.phy@gmail.com>
@@ -338,8 +350,8 @@ if (CGNS_ENABLE_HDF5)
endif ()

# Check if HDF5 version is 1.8 or greater
if (HDF5_VERSION VERSION_LESS "1.8.0")
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't found any cmake documentation about HDF5_VERSION_STRING ... while HD5_VERSION should be properly defined.

Copy link
Member

Choose a reason for hiding this comment

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

Correct, It should be HDF5_VERSION, which is set by find_package HDF5

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After updating to HDF5 version 1.10.9 the error I got doesn't occur, so yes the correct variable should be HDF5_VERSION. I'll push up the change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What happens for the case CGNS_ENABLE_CGNSTOOLS=ON, CGNS_ENABLE_UTILS=OFF. Does it still build the command line tools?

The additional CMake commands should not impact the CGNS_ENABLE_CGNSTOOLS option. Yes CGNSTOOLS should be able to compile things like (cgns_to_xxx, xxx_to_cgns, etc). UTILS just allows for compiling the command line tools without the Tk/Tcl GUI.

@brtnfld
Copy link
Member

brtnfld commented Jun 22, 2023

What happens for the case CGNS_ENABLE_CGNSTOOLS=ON, CGNS_ENABLE_UTILS=OFF. Does it still build the command line tools?

@brtnfld
Copy link
Member

brtnfld commented Jun 23, 2023

Can you add to the Mac github action the option -DCGNS_ENABLE_UTILS=ON?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants