Skip to content

Commit

Permalink
Move podio_PYTHON_DIR to the top level CMakeLists (#497)
Browse files Browse the repository at this point in the history
Co-authored-by: jmcarcell <[email protected]>
  • Loading branch information
jmcarcell and jmcarcell authored Oct 4, 2023
1 parent 2bf7c49 commit 4d6c0b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/NOTICE

#--- project specific subdirectories -------------------------------------------
add_subdirectory(src)

# Set the podio_PYTHON_DIR manually here because the macros in tests expect it
# If testing is not build this helps when building together with other packages
SET(podio_PYTHON_DIR ${PROJECT_SOURCE_DIR}/python CACHE PATH "Path to the podio python directory")

if(BUILD_TESTING)
include(cmake/podioTest.cmake)
add_subdirectory(tests)
Expand Down
3 changes: 0 additions & 3 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ foreach( _conf ${CMAKE_CONFIGURATION_TYPES} )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${_conf} ${CMAKE_CURRENT_BINARY_DIR} )
endforeach()

# Set the podio_PYTHON_DIR manually here because the macros below expect it
SET(podio_PYTHON_DIR ${PROJECT_SOURCE_DIR}/python CACHE PATH "Path to the podio python directory")

PODIO_GENERATE_DATAMODEL(datamodel datalayout.yaml headers sources
IO_BACKEND_HANDLERS ${PODIO_IO_HANDLERS}
)
Expand Down

0 comments on commit 4d6c0b7

Please sign in to comment.