Skip to content

Commit

Permalink
Fix handling of deprecated CMake options
Browse files Browse the repository at this point in the history
  • Loading branch information
taylor-a-barnes committed Jan 7, 2025
1 parent e661fd8 commit f7a733a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,23 @@ option(language "Deprecated; use MDI_CXX, MDI_Fortran, and/or MDI_Python instead
option(libtype "Deprecated; use BUILD_SHARED_LIBS instead.")
set(mpi ${MDI_USE_MPI} CACHE STRING "Deprecated; use MDI_USE_MPI instead.")
set(python_package ${MDI_Python_PACKAGE} CACHE STRING "Deprecated; use MDI_Python_PACKAGE instead.")
set(plugins ${MDI_PLUGINS} CACHE STRING "Deprecated; use MDI_PLUGINS instead.")
set(plugins "" CACHE STRING "Deprecated; use MDI_PLUGINS instead.")
if ( plugins STREQUAL "" )
set(plugins ${MDI_PLUGINS})
else()
set(MDI_PLUGINS ${plugins})
set(MDI_Python_PLUGINS ${plugins})
endif()
set(python_plugins ${MDI_Python_PLUGINS} CACHE STRING "Deprecated; use MDI_Python_PLUGINS instead.")
set(python_version ${MDI_Python_VERSION} CACHE STRING "Deprecated; use MDI_Python_VERSION instead.")
set(test_codes ${MDI_TEST_CODES} CACHE STRING "Deprecated; use MDI_TEST_CODES instead.")
set(test_codes "" CACHE STRING "Deprecated; use MDI_TEST_CODES instead.")
if( test_codes STREQUAL "" )
set(test_codes ${MDI_TEST_CODES})
else()
set(MDI_TEST_CODES ${test_codes})
set(MDI_TEST_DRIVERS ${test_codes})
set(MDI_TEST_ENGINES ${test_codes})
endif()
set(test_drivers ${MDI_TEST_DRIVERS} CACHE STRING "Deprecated; use MDI_TEST_DRIVERS instead.")
set(test_engines ${MDI_TEST_ENGINES} CACHE STRING "Deprecated; use MDI_TEST_ENGINES instead.")
set(debug ${MDI_DEBUG} CACHE STRING "Deprecated; use MDI_DEBUG instead.")
Expand Down

0 comments on commit f7a733a

Please sign in to comment.