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

Test for FETCHCONTENT_BASE_DIR #9

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

Lambourl
Copy link
Contributor

@Lambourl Lambourl commented Jan 29, 2025

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

@Lambourl Lambourl force-pushed the feature/FETCHCONTENT_BASE_DIR_test branch 2 times, most recently from 0d6d1b2 to 2b10286 Compare January 30, 2025 09:24
@Lambourl Lambourl changed the title Remove by default build dir and test FETCHCONTENT_BASE_DIR Add a test on the variable FETCHCONTENT_BASE_DIR Jan 30, 2025
@Lambourl Lambourl marked this pull request as ready for review January 30, 2025 09:25
@daminetreg daminetreg changed the title Add a test on the variable FETCHCONTENT_BASE_DIR Fix HERMETIC_FETCHCONTENT_REMOVE_SOURCE_DIR_AFTER_INSTALL deafault + test for FETCHCONTENT_BASE_DIR Jan 31, 2025
@daminetreg daminetreg changed the title Fix HERMETIC_FETCHCONTENT_REMOVE_SOURCE_DIR_AFTER_INSTALL deafault + test for FETCHCONTENT_BASE_DIR Fix HERMETIC_FETCHCONTENT_REMOVE_SOURCE_DIR_AFTER_INSTALL default + test for FETCHCONTENT_BASE_DIR Jan 31, 2025
@daminetreg daminetreg changed the base branch from main to release/v1.0.11 January 31, 2025 13:39
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"));
Copy link
Contributor

@daminetreg daminetreg Jan 31, 2025

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.

Copy link
Contributor Author

@Lambourl Lambourl Jan 31, 2025

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

@daminetreg daminetreg changed the base branch from release/v1.0.11 to main January 31, 2025 13:46
Copy link
Contributor

@daminetreg daminetreg left a 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

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()
Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor Author

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

@Lambourl Lambourl force-pushed the feature/FETCHCONTENT_BASE_DIR_test branch from 2b10286 to 941350c Compare January 31, 2025 15:16
@Lambourl Lambourl changed the title Fix HERMETIC_FETCHCONTENT_REMOVE_SOURCE_DIR_AFTER_INSTALL default + test for FETCHCONTENT_BASE_DIR Test for FETCHCONTENT_BASE_DIR Jan 31, 2025
@daminetreg daminetreg changed the base branch from main to release/v1.0.11 February 3, 2025 12:38
Automatic test to avoid regressions when user sets independently or
combine FETCHCONTENT_BASE_DIR or HERMETIC_FETCHCONTENT_INSTALL_DIR.

Change-Id: I0706eed78eeaaa861434ef1038d0bc011a31ad0d
@daminetreg daminetreg force-pushed the feature/FETCHCONTENT_BASE_DIR_test branch from 941350c to 07c63bc Compare February 3, 2025 13:53
Copy link
Contributor

@daminetreg daminetreg left a 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.

@daminetreg daminetreg merged commit 07c63bc into release/v1.0.11 Feb 3, 2025
1 check passed
@daminetreg daminetreg deleted the feature/FETCHCONTENT_BASE_DIR_test branch February 4, 2025 10:39
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