Skip to content

Commit

Permalink
Rename CMAKE_{SOURCE,BIN}_DIR -> PROJECT_{SOURCE,BIN}_DIR (#213)
Browse files Browse the repository at this point in the history
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
  • Loading branch information
jmcarcell and jmcarcell authored Jul 13, 2023
1 parent 3390914 commit 75368cb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions cmake/EDM4HEPCPack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ set(CPACK_DEBIAN_PACKAGE_MAINTAINER "valentin.volkl@cern.ch")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${CPACK_PACKAGE_HOMEPAGE_URL})
set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "hep-root, hep-podio")

set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set(CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/README.md")

#--- source package settings ---------------------------------------------------
set(CPACK_SOURCE_IGNORE_FILES
Expand Down
8 changes: 4 additions & 4 deletions doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ FULL_PATH_NAMES = YES
# will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES.

STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@ @CMAKE_BINARY_DIR@
STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@ @CMAKE_BINARY_DIR@

# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which
Expand Down Expand Up @@ -743,7 +743,7 @@ WARN_LOGFILE = @CMAKE_BINARY_DIR@/doxygen-warnings.log
# spaces.
# Note: If this tag is empty the current directory is searched.

INPUT = @CMAKE_SOURCE_DIR@
INPUT = @PROJECT_SOURCE_DIR@
INPUT += @CMAKE_BINARY_DIR@/include
INPUT += @CMAKE_CURRENT_BINARY_DIR@

Expand Down Expand Up @@ -818,7 +818,7 @@ EXCLUDE_SYMBOLS =
# that contain example code fragments that are included (see the \include
# command).

EXAMPLE_PATH = @CMAKE_SOURCE_DIR@
EXAMPLE_PATH = @PROJECT_SOURCE_DIR@

# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
Expand All @@ -838,7 +838,7 @@ EXAMPLE_RECURSIVE = NO
# that contain images that are to be included in the documentation (see the
# \image command).

IMAGE_PATH = @CMAKE_SOURCE_DIR@
IMAGE_PATH = @PROJECT_SOURCE_DIR@

# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
Expand Down
12 changes: 6 additions & 6 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ function(set_test_env _testname)
endfunction()

add_executable(write_events write_events.cc)
target_include_directories(write_events PUBLIC ${CMAKE_SOURCE_DIR}/edm4hep )
target_include_directories(write_events PUBLIC ${PROJECT_SOURCE_DIR}/edm4hep )
target_link_libraries(write_events edm4hep podio::podioRootIO)
add_test(NAME write_events COMMAND write_events)
set_test_env(write_events)

add_executable(read_events read_events.cc)
target_include_directories(read_events PUBLIC ${CMAKE_SOURCE_DIR}/edm4hep )
target_include_directories(read_events PUBLIC ${PROJECT_SOURCE_DIR}/edm4hep )
target_link_libraries(read_events edm4hep podio::podioRootIO)
add_test(NAME read_events COMMAND read_events)
set_property(TEST read_events PROPERTY
Expand All @@ -29,13 +29,13 @@ set_test_env(read_events)

IF(TARGET edm4hepSioBlocks)
add_executable(write_events_sio write_events_sio.cc)
target_include_directories(write_events_sio PUBLIC ${CMAKE_SOURCE_DIR}/edm4hep)
target_include_directories(write_events_sio PUBLIC ${PROJECT_SOURCE_DIR}/edm4hep)
target_link_libraries(write_events_sio edm4hep podio::podioSioIO)
add_test(NAME write_events_sio COMMAND write_events_sio)
set_test_env(write_events_sio)

add_executable(read_events_sio read_events_sio.cc)
target_include_directories(read_events_sio PUBLIC ${CMAKE_SOURCE_DIR}/edm4hep)
target_include_directories(read_events_sio PUBLIC ${PROJECT_SOURCE_DIR}/edm4hep)
target_link_libraries(read_events_sio edm4hep podio::podioSioIO)
add_test(NAME read_events_sio COMMAND read_events_sio)
set_test_env(read_events_sio)
Expand All @@ -46,7 +46,7 @@ ENDIF()

IF(TARGET ROOT::ROOTDataFrame)
add_executable(test_rdf test_rdf.cc)
target_include_directories(test_rdf PUBLIC ${CMAKE_SOURCE_DIR}/edm4hep ${CMAKE_SOURCE_DIR}/dataframe )
target_include_directories(test_rdf PUBLIC ${PROJECT_SOURCE_DIR}/edm4hep ${PROJECT_SOURCE_DIR}/dataframe )
target_link_libraries(test_rdf edm4hepRDF ROOT::ROOTDataFrame podio::podioRootIO)
add_test(NAME test_rdf COMMAND test_rdf)
set_test_env(test_rdf)
Expand All @@ -59,7 +59,7 @@ IF(TARGET ROOT::ROOTDataFrame)
get_property(ENVIRONMENT TEST py_test_rdf PROPERTY ENVIRONMENT)
set_property(TEST py_test_rdf PROPERTY ENVIRONMENT
${ENVIRONMENT}
PYTHONPATH=${CMAKE_SOURCE_DIR}/python:$ENV{PYTHONPATH}
PYTHONPATH=${PROJECT_SOURCE_DIR}/python:$ENV{PYTHONPATH}
)
set_tests_properties(py_test_rdf PROPERTIES DEPENDS write_events)
endif()
Expand Down
2 changes: 1 addition & 1 deletion test/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ add_test(NAME pyunittests COMMAND python -m unittest discover -s ${CMAKE_CURRENT
set_property(TEST pyunittests
PROPERTY ENVIRONMENT
LD_LIBRARY_PATH=$<TARGET_FILE_DIR:edm4hep>:$<TARGET_FILE_DIR:podio::podio>:$<$<TARGET_EXISTS:edm4hepRDF>:$<TARGET_FILE_DIR:edm4hepRDF>:>$<TARGET_FILE_DIR:ROOT::Core>:$ENV{LD_LIBRARY_PATH}
PYTHONPATH=${CMAKE_SOURCE_DIR}/python:$ENV{PYTHONPATH}
PYTHONPATH=${PROJECT_SOURCE_DIR}/python:$ENV{PYTHONPATH}
ROOT_INCLUDE_PATH=${PROJECT_SOURCE_DIR}/edm4hep:${PROJECT_SOURCE_DIR}/utils/include:$ENV{ROOT_INCLUDE_PATH}
)

0 comments on commit 75368cb

Please # to comment.