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

Free the longoptions from the #ifdefs jail #8441

Merged
merged 4 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Remove all traces of the USE_COMMON_LONG_OPTIONS
  • Loading branch information
joa-quim committed Apr 13, 2024
commit 3d1d959f37a570df67879fb9bd69776399023c8f
5 changes: 0 additions & 5 deletions ci/config-gmt-unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ set (SUPPORT_EXEC_IN_BINARY_DIR TRUE)

# For code coverage
set (CMAKE_C_FLAGS "--coverage -O0 ${CMAKE_C_FLAGS}")

# Turn on testing of upcoming long-option syntax for common GMT options
add_definitions(-DUSE_COMMON_LONG_OPTIONS)
# Turn on testing of upcoming long-option syntax for module options
add_definitions(-DUSE_MODULE_LONG_OPTIONS)
EOF
fi

Expand Down
5 changes: 0 additions & 5 deletions ci/config-gmt-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ set (DO_TESTS TRUE)
set (DO_API_TESTS ON)
set (DO_SUPPLEMENT_TESTS ON)
set (SUPPORT_EXEC_IN_BINARY_DIR TRUE)

# Turn on testing of upcoming long-option syntax for common GMT options
add_definitions(-DUSE_COMMON_LONG_OPTIONS)
# Turn on testing of upcoming long-option syntax for module options
add_definitions(-DUSE_MODULE_LONG_OPTIONS)
EOF
fi

Expand Down
2 changes: 0 additions & 2 deletions cmake/ConfigUserAdvancedTemplate.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,6 @@ set (GMT_ENABLE_OPENMP TRUE)
# Uncomment these two statements if you are a developer debugging GMT:
#add_definitions(-DDEBUG)
#add_definitions(-DMEMDEBUG) # Turn on memory tracking; see gmt_memory .c on MEMDEBUG for information
#add_definitions(-DUSE_COMMON_LONG_OPTIONS) # Turn on testing of upcoming long-option syntax for common GMT options
#add_definitions(-DUSE_MODULE_LONG_OPTIONS) # Turn on testing of upcoming long-option syntax for module options
#add_definitions(-DEXPORT_GMTLIB) # Turn on to access normally un-exported or static gmtlib functions from external tools
#add_definitions(-DNO_THEMES) # Turn off implementation of GMT_THEME for debugging
# Uncomment this statement if you are a developer debugging PSL and want exact line coordinates:
Expand Down
3 changes: 0 additions & 3 deletions doc/rst/source/devdocs/long_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ argument to the equivalent short-option argument. That way, we only need to cal
function at the start of a module and do the replacement. Then, the specific
parsers we already have for common and module options will work as is. This design simplifies
the coding tremendously and only requires us to create the translation tables.
The approach has already been implemented and tested for the ~30 GMT Common Options and
developers can play with this by adding the compiler flag **-DUSE_COMMON_LONG_OPTIONS**
when building GMT.
The translations for the GMT common options are encapsulated in a single include file
(gmt_common_longoptions.h) that populates a *gmt_common_kw* structure and looks like this:

Expand Down