Skip to content

Commit

Permalink
add cmake machinery to set coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
jdolence committed Jan 8, 2025
1 parent bd0ac38 commit 45705b1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,16 @@ set(COMPILED_WITH ${CMAKE_CXX_COMPILER})
set(COMPILER_COMMAND "<not-implemented>") # TODO: Put something more descriptive here
set(COMPILER_FLAGS "<not-implemented>") # TODO: Put something more descriptive here

if (NOT COORDINATE_TYPE)
set(PARTHENON_COORDINATES "Cartesian" CACHE STRING "Set the coordinate system from {Cartesian, Cylindrical, Spherical} with Cartesian the default")

if (${PARTHENON_COORDINATES} STREQUAL "Cartesian")
set(COORDINATE_TYPE UniformCartesian)
elseif(${PARTHENON_COORDINATES} STREQUAL "Cylindrical")
set(COORDINATE_TYPE UniformCylindrical)
elseif(${PARTHENON_COORDINATES} STREQUAL "Spherical")
set(COORDINATE_TYPE UniformSpherical)
else()
message(FATAL_ERROR "Invalid setting for COORDINATES")
endif()
message(STATUS "COORDINATE_TYPE = " ${COORDINATE_TYPE})

Expand Down

0 comments on commit 45705b1

Please sign in to comment.