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

Fixed broken package configuration #115

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Anticom
Copy link

@Anticom Anticom commented Sep 14, 2016

Pion failed finding the file when being used as a submodule.

Steps to reproduce (tested on linux):

  1. Create a new directory foo
  2. Create foo/CMakeLists.txt that has add_subdirectory("pion") in it
  3. clone pion in foo (so you get foo/pion/...)
  4. Create foo/Release
  5. cd into foo/Release and run cmake ..

This change makes the file being configured relative to the current directory src/CMakeLists.txt is placed in. Maybe PION_SRC_ROOT could have been used, however this is working aswell.

Pion failed finding the file when being used as a submodule.
@@ -141,7 +141,7 @@ install(TARGETS ${PROJECT_NAME}
)

include(CMakePackageConfigHelpers)
configure_file(${CMAKE_SOURCE_DIR}/cmake/modules/lib${PROJECT_NAME}-config.cmake.in
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules/lib${PROJECT_NAME}-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/lib${PROJECT_NAME}-config.cmake
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will changing ${CMAKE_SOURCE_DIR} to ${PION_SRC_ROOT} can help?
Just to skip ``../`

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that worked aswell

@Anticom
Copy link
Author

Anticom commented Sep 14, 2016

Also i've noticed that for some reason, the pion artifacts are build relative to pion's directory suprizes me, since COMMON_BIN_PATH is set to ${CMAKE_BINARY_DIR}/BIN and CMAKE_BINARY_DIR should be relative to the root-CMakeLists.txt. @snikulov do you have an idea why that is?

@snikulov
Copy link
Contributor

@Anticom Well it was a long time ago :)
I don't remember exactly.
Perhaps it is time to rewrite build system with proper and best practices in mind.

@snikulov
Copy link
Contributor

👍 LGTM

@Anticom
Copy link
Author

Anticom commented Sep 14, 2016

I'll have a look at the CMake build files. Maybe I can contribute the rewrite you're talking about @snikulov

@Anticom
Copy link
Author

Anticom commented Feb 14, 2017

Any updates on whether and if so when the PR will be merged eventually? 😉

firedaemon-cto pushed a commit to FireDaemon/pion that referenced this pull request Aug 27, 2020
firedaemon-cto pushed a commit to FireDaemon/pion that referenced this pull request Aug 27, 2020
* Synchronize each miscrosec test to the next second (splunk#109)

* Synchronize each miscrosec test to the next second

The aim is to avoid false positives in test_microsec when the seconds,
minutes or hours change during time read between the second_clock and
the microsec_clock.

* Improved readability of the microcec_time_clock test

* Improve performance of adding and subtracting time durations from a ptime. (splunk#99)

Modifying ptime objects by adding and subtracting time durations was
inefficient because it extracted the date and time of day and then
re-constructed a ptime using the date and modified time of day.

This can be avoided by using the existing time_system utilities which
perform the operation by adjusting the number of ticks.

Performance is improved by a factor of 48 on my system.

* Update CI Scripts

* Add time_duration helper functions: (splunk#113)

1. is_positive()
  - Return boolean value to indicate whether or not time duration is
    positive.
2. is_zero()
  - Return boolean value to indicate whether or not time duration is
    zero.
3. abs()
  - Return a time_duration which is the absolute value of time
    duration.

Added documentation for these helper functions and improved existing
documentation to indicate constness, return values or static
functions.

* Cease dependence on MPL (splunk#115)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants