Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename CMAKE_BINARY_DIR to PROJECT_BINARY_DIR #455

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/podioDoxygen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/doxy-boot.js.in
${CMAKE_BINARY_DIR}/doxygen/html/doxy-boot.js)
${PROJECT_BINARY_DIR}/doxygen/html/doxy-boot.js)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
Expand Down
2 changes: 1 addition & 1 deletion cmake/podioMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ function(PODIO_CHECK_CPP_FS FS_LIBS)
# After that it should be built-in
FOREACH(FS_LIB_NAME "" stdc++fs c++fs)
# MESSAGE(STATUS "Linking against ${FS_LIB_NAME}")
try_compile(have_filesystem ${CMAKE_BINARY_DIR}/try ${PROJECT_SOURCE_DIR}/cmake/try_filesystem.cpp
try_compile(have_filesystem ${PROJECT_BINARY_DIR}/try ${PROJECT_SOURCE_DIR}/cmake/try_filesystem.cpp
CXX_STANDARD ${CMAKE_CXX_STANDARD}
CXX_EXTENSIONS False
OUTPUT_VARIABLE HAVE_FS_OUTPUT
Expand Down
6 changes: 3 additions & 3 deletions cmake/podioTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ function(PODIO_SET_TEST_ENV test)
list(JOIN PODIO_IO_HANDLERS " " IO_HANDLERS)
set_property(TEST ${test}
PROPERTY ENVIRONMENT
LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests:${CMAKE_BINARY_DIR}/src:$<TARGET_FILE_DIR:ROOT::Tree>:$<$<TARGET_EXISTS:SIO::sio>:$<TARGET_FILE_DIR:SIO::sio>>:$ENV{LD_LIBRARY_PATH}
LD_LIBRARY_PATH=${PROJECT_BINARY_DIR}/tests:${PROJECT_BINARY_DIR}/src:$<TARGET_FILE_DIR:ROOT::Tree>:$<$<TARGET_EXISTS:SIO::sio>:$<TARGET_FILE_DIR:SIO::sio>>:$ENV{LD_LIBRARY_PATH}
PYTHONPATH=${PROJECT_SOURCE_DIR}/python:$ENV{PYTHONPATH}
PODIO_SIOBLOCK_PATH=${CMAKE_BINARY_DIR}/tests
ROOT_INCLUDE_PATH=${CMAKE_BINARY_DIR}/tests/datamodel:${PROJECT_SOURCE_DIR}/include
PODIO_SIOBLOCK_PATH=${PROJECT_BINARY_DIR}/tests
ROOT_INCLUDE_PATH=${PROJECT_BINARY_DIR}/tests/datamodel:${PROJECT_SOURCE_DIR}/include
SKIP_SIO_TESTS=$<NOT:$<BOOL:${ENABLE_SIO}>>
IO_HANDLERS=${IO_HANDLERS}
PODIO_USE_CLANG_FORMAT=${PODIO_USE_CLANG_FORMAT}
Expand Down
12 changes: 6 additions & 6 deletions doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/doxygen
OUTPUT_DIRECTORY = @PROJECT_BINARY_DIR@/doxygen

# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
Expand Down 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 = @PROJECT_SOURCE_DIR@ @CMAKE_BINARY_DIR@
STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@ @PROJECT_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 All @@ -153,7 +153,7 @@ STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@ @CMAKE_BINARY_DIR@
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.

STRIP_FROM_INC_PATH = @DOXYGEN_INCLUDE_DIRS@ @CMAKE_BINARY_DIR@/include
STRIP_FROM_INC_PATH = @DOXYGEN_INCLUDE_DIRS@ @PROJECT_BINARY_DIR@/include

# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
# less readable) file names. This can be useful is your file systems doesn't
Expand Down Expand Up @@ -731,7 +731,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).

WARN_LOGFILE = @CMAKE_BINARY_DIR@/doxygen-warnings.log
WARN_LOGFILE = @PROJECT_BINARY_DIR@/doxygen-warnings.log

#---------------------------------------------------------------------------
# Configuration options related to the input files
Expand All @@ -744,7 +744,7 @@ WARN_LOGFILE = @CMAKE_BINARY_DIR@/doxygen-warnings.log
# Note: If this tag is empty the current directory is searched.

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

# This tag can be used to specify the character encoding of the source files
Expand Down Expand Up @@ -801,7 +801,7 @@ EXCLUDE_SYMLINKS = NO
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/*

EXCLUDE_PATTERNS = */tests/* */dict/* */cmake/* @CMAKE_BINARY_DIR@
EXCLUDE_PATTERNS = */tests/* */dict/* */cmake/* @PROJECT_BINARY_DIR@

# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
Expand Down
2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ IF (BUILD_TESTING)
if (TARGET write_sio)
set_property(TEST pyunittest PROPERTY DEPENDS write_sio write_frame_sio)
endif()
set_property(TEST pyunittest PROPERTY WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tests)
set_property(TEST pyunittest PROPERTY WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests)
ENDIF()
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ CREATE_PODIO_TEST(ostream_operator.cpp "")
CREATE_PODIO_TEST(write_ascii.cpp "")

# Customize CTest to potentially disable some of the tests with known problems
configure_file(CTestCustom.cmake ${CMAKE_BINARY_DIR}/CTestCustom.cmake @ONLY)
configure_file(CTestCustom.cmake ${PROJECT_BINARY_DIR}/CTestCustom.cmake @ONLY)
8 changes: 4 additions & 4 deletions tests/dumpmodel/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Add tests for storing and retrieving the EDM definitions into the produced
# files
add_test(NAME datamodel_def_store_roundtrip_root COMMAND ${PROJECT_SOURCE_DIR}/tests/scripts/dumpModelRoundTrip.sh
${CMAKE_BINARY_DIR}/tests/root_io/example_frame.root
${PROJECT_BINARY_DIR}/tests/root_io/example_frame.root
datamodel
${PROJECT_SOURCE_DIR}/tests
)
Expand All @@ -10,7 +10,7 @@ PODIO_SET_TEST_ENV(datamodel_def_store_roundtrip_root)
# The extension model needs to know about the upstream model for generation
add_test(NAME datamodel_def_store_roundtrip_root_extension COMMAND
${PROJECT_SOURCE_DIR}/tests/scripts/dumpModelRoundTrip.sh
${CMAKE_BINARY_DIR}/tests/root_io/example_frame.root
${PROJECT_BINARY_DIR}/tests/root_io/example_frame.root
extension_model
${PROJECT_SOURCE_DIR}/tests/extension_model
--upstream-edm=datamodel:${PROJECT_SOURCE_DIR}/tests/datalayout.yaml
Expand All @@ -28,14 +28,14 @@ set_tests_properties(
set(sio_roundtrip_tests "")
if (ENABLE_SIO)
add_test(NAME datamodel_def_store_roundtrip_sio COMMAND ${PROJECT_SOURCE_DIR}/tests/scripts/dumpModelRoundTrip.sh
${CMAKE_BINARY_DIR}/tests/sio_io/example_frame.sio
${PROJECT_BINARY_DIR}/tests/sio_io/example_frame.sio
datamodel
${PROJECT_SOURCE_DIR}/tests
)
PODIO_SET_TEST_ENV(datamodel_def_store_roundtrip_sio)
# The extension model needs to know about the upstream model for generation
add_test(NAME datamodel_def_store_roundtrip_sio_extension COMMAND ${PROJECT_SOURCE_DIR}/tests/scripts/dumpModelRoundTrip.sh
${CMAKE_BINARY_DIR}/tests/sio_io/example_frame.sio
${PROJECT_BINARY_DIR}/tests/sio_io/example_frame.sio
extension_model
${PROJECT_SOURCE_DIR}/tests/extension_model
--upstream-edm=datamodel:${PROJECT_SOURCE_DIR}/tests/datalayout.yaml
Expand Down
2 changes: 1 addition & 1 deletion tests/root_io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if (DEFINED CACHE{PODIO_TEST_INPUT_DATA_DIR})
macro(ADD_PODIO_LEGACY_TEST version base_test input_file)
add_test(NAME ${base_test}_${version} COMMAND ${base_test} ${PODIO_TEST_INPUT_DATA_DIR}/${version}/${input_file})
set_property(TEST ${base_test}_${version} PROPERTY ENVIRONMENT
LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests:${CMAKE_BINARY_DIR}/src:$ENV{LD_LIBRARY_PATH}
LD_LIBRARY_PATH=${PROJECT_BINARY_DIR}/tests:${PROJECT_BINARY_DIR}/src:$ENV{LD_LIBRARY_PATH}
# Clear the ROOT_INCLUDE_PATH for the tests, to avoid potential conflicts
# with existing headers from other installations
ROOT_INCLUDE_PATH=
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ else()
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
TEST_PREFIX "UT_" # make it possible to filter easily with -R ^UT
TEST_SPEC ${filter_tests} # discover only tests that are known to not fail
DL_PATHS ${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_BINARY_DIR}/src:$<TARGET_FILE_DIR:ROOT::Tree>:$<$<TARGET_EXISTS:SIO::sio>:$<TARGET_FILE_DIR:SIO::sio>>:$ENV{LD_LIBRARY_PATH}
DL_PATHS ${CMAKE_CURRENT_BINARY_DIR}:${PROJECT_BINARY_DIR}/src:$<TARGET_FILE_DIR:ROOT::Tree>:$<$<TARGET_EXISTS:SIO::sio>:$<TARGET_FILE_DIR:SIO::sio>>:$ENV{LD_LIBRARY_PATH}
PROPERTIES
ENVIRONMENT
PODIO_SIOBLOCK_PATH=${CMAKE_CURRENT_BINARY_DIR}
Expand Down
16 changes: 8 additions & 8 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ if(BUILD_TESTING)
endfunction()

CREATE_DUMP_TEST(podio-dump-help _dummy_target_ --help)
CREATE_DUMP_TEST(podio-dump-root-legacy "write" ${CMAKE_BINARY_DIR}/tests/root_io/example.root)
CREATE_DUMP_TEST(podio-dump-root "write_frame_root" ${CMAKE_BINARY_DIR}/tests/root_io/example_frame.root)
CREATE_DUMP_TEST(podio-dump-detailed-root "write_frame_root" --detailed --category other_events --entries 2:3 ${CMAKE_BINARY_DIR}/tests/root_io/example_frame.root)
CREATE_DUMP_TEST(podio-dump-detailed-root-legacy "write" --detailed --entries 2:3 ${CMAKE_BINARY_DIR}/tests/root_io/example.root)
CREATE_DUMP_TEST(podio-dump-root-legacy "write" ${PROJECT_BINARY_DIR}/tests/root_io/example.root)
CREATE_DUMP_TEST(podio-dump-root "write_frame_root" ${PROJECT_BINARY_DIR}/tests/root_io/example_frame.root)
CREATE_DUMP_TEST(podio-dump-detailed-root "write_frame_root" --detailed --category other_events --entries 2:3 ${PROJECT_BINARY_DIR}/tests/root_io/example_frame.root)
CREATE_DUMP_TEST(podio-dump-detailed-root-legacy "write" --detailed --entries 2:3 ${PROJECT_BINARY_DIR}/tests/root_io/example.root)

if (ENABLE_SIO)
CREATE_DUMP_TEST(podio-dump-sio-legacy "write_sio" ${CMAKE_BINARY_DIR}/tests/sio_io/example.sio)
CREATE_DUMP_TEST(podio-dump-sio "write_frame_sio" --entries 4:7 ${CMAKE_BINARY_DIR}/tests/sio_io/example_frame.sio)
CREATE_DUMP_TEST(podio-dump-detailed-sio "write_frame_sio" --detailed --entries 9 ${CMAKE_BINARY_DIR}/tests/sio_io/example_frame.sio)
CREATE_DUMP_TEST(podio-dump-detailed-sio-legacy "write_sio" --detailed --entries 9 ${CMAKE_BINARY_DIR}/tests/sio_io/example.sio)
CREATE_DUMP_TEST(podio-dump-sio-legacy "write_sio" ${PROJECT_BINARY_DIR}/tests/sio_io/example.sio)
CREATE_DUMP_TEST(podio-dump-sio "write_frame_sio" --entries 4:7 ${PROJECT_BINARY_DIR}/tests/sio_io/example_frame.sio)
CREATE_DUMP_TEST(podio-dump-detailed-sio "write_frame_sio" --detailed --entries 9 ${PROJECT_BINARY_DIR}/tests/sio_io/example_frame.sio)
CREATE_DUMP_TEST(podio-dump-detailed-sio-legacy "write_sio" --detailed --entries 9 ${PROJECT_BINARY_DIR}/tests/sio_io/example.sio)
endif()

endif()
Loading