Skip to content

Commit

Permalink
fixed python version in cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
givelberg committed Nov 13, 2024
1 parent 1c5cc2e commit 823c155
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/marine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ install(FILES ${test_input}
# bufr to ioda tests:
###########################################################################

find_package(Python REQUIRED)
# Extract the major and minor version (e.g., "3.10" from "3.10.13")
string(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" PYTHON_MAJOR_MINOR ${Python_VERSION})
set(PYIODACONV_DIR "${PROJECT_SOURCE_DIR}/build/lib/python${PYTHON_MAJOR_MINOR}/")

set(TEST_WORKING_DIR ${PROJECT_BINARY_DIR}/test/marine)
set(MARINE_BUFR2IODA_DIR ${PROJECT_SOURCE_DIR}/ush/ioda/bufr2ioda/marine)
set(MARINE_BUFR2IODA_DIR ${MARINE_BUFR2IODA_DIR}/b2i)
set(CONFIG_DIR ${PROJECT_SOURCE_DIR}/test/marine/testinput)
set(TESTREF_DIR ${PROJECT_SOURCE_DIR}/test/marine/testref)
set(PYIODACONV_DIR "${PROJECT_SOURCE_DIR}/build/lib/python3.10/")


# prepare a test.yaml file from test.yaml.in by replacing
Expand Down

0 comments on commit 823c155

Please sign in to comment.