-
Notifications
You must be signed in to change notification settings - Fork 2
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
Test for FETCHCONTENT_BASE_DIR #9
Conversation
0d6d1b2
to
2b10286
Compare
test/check_change_base.cpp
Outdated
fs::exists((new_base_fetchcontent / "iconv-build" / "CMakeCache.txt")); | ||
run_command(get_cmake_build_command(test_project_path, data), test_project_path); | ||
fs::exists((new_base_fetchcontent / "mathlib-install" / "lib" / "libMathFunctions.a")); | ||
fs::exists((new_base_fetchcontent / "Iconv-install" / "lib" / "libiconv.a")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Lambourl,
Thanks for your contribution, however the test doesn't test anything, no BOOST_REQUIRE in there. The behaviour isn't tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes you are right i don't know why I forgot to use BOOST_REQUIRE, I have done the change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution, however the following would be needed :
- Split the change in 2 PRs
- fix the test which doesn't really test anything
cmake/modules/hfc_initialize.cmake
Outdated
if (NOT DEFINED CACHE{HERMETIC_FETCHCONTENT_REMOVE_BUILD_DIR_AFTER_INSTALL}) | ||
set(HERMETIC_FETCHCONTENT_REMOVE_SOURCE_DIR_AFTER_INSTALL OFF CACHE BOOL "By default save space by removing sources after install" FORCE) | ||
if (NOT DEFINED CACHE{HERMETIC_FETCHCONTENT_REMOVE_SOURCE_DIR_AFTER_INSTALL}) | ||
set(HERMETIC_FETCHCONTENT_REMOVE_SOURCE_DIR_AFTER_INSTALL OFF CACHE BOOL "By default keep install folder" FORCE) | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we switched to OFF by default we could actually likely remove completely both checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is lilkely the topic of another PR than this one :
- 1 PR for FETCHCONTENT_BASE_DIR test
- 1 PR for the typo fix of HERMETIC_FETCHCONTENT_REMOVE_SOURCE_DIR_AFTER_INSTALL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#14 pr for : HERMETIC_FETCHCONTENT_REMOVE_SOURCE_DIR_AFTER_INSTALL
2b10286
to
941350c
Compare
Automatic test to avoid regressions when user sets independently or combine FETCHCONTENT_BASE_DIR or HERMETIC_FETCHCONTENT_INSTALL_DIR. Change-Id: I0706eed78eeaaa861434ef1038d0bc011a31ad0d
941350c
to
07c63bc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After @Lambourl removed the fix into a separate PR and after I extended the tests I approve the change is ready for release.
Added test showing that you can move the build folder and install folder by forcing FETCHCONTENT_BASE_DIR .
Close : https://github.com/tipi-build/specs-cmake-re/issues/42