Commit Graph

280 Commits

Author SHA1 Message Date
Borislav Stanimirov
8aa2732145 Setup Ruby inistead of requiring windows-2022 2022-01-14 06:06:00 +02:00
Borislav Stanimirov
754d6ed2c6 Typo 2022-01-14 05:48:25 +02:00
Borislav Stanimirov
358ab4dbba Merge remote-tracking branch 'origin/master' into integration-tests 2022-01-13 10:39:37 +02:00
Borislav Stanimirov
6b918249af Tips 2022-01-13 10:38:17 +02:00
Borislav Stanimirov
659e1a364d Split docs into multiple files. Complete tutorial. Reference. 2022-01-13 10:06:13 +02:00
Borislav Stanimirov
c7fd76ae0e Project file creation tweaks 2022-01-13 08:16:52 +02:00
Borislav Stanimirov
9eab1913f1 WiP for integration test documentation 2022-01-13 07:10:29 +02:00
Borislav Stanimirov
09def1e838 WiP for integration test documentation 2022-01-13 06:50:22 +02:00
Borislav Stanimirov
3bac936384 Moved env clean to cleanup to make setup methods simpler (not require super) 2022-01-13 06:38:11 +02:00
Borislav Stanimirov
74494e645f Style 2022-01-13 05:28:05 +02:00
Borislav Stanimirov
8ba308cdba Small source_cache test 2022-01-13 05:16:51 +02:00
Lars Melchior
a27c66a3ea Remove badges (#327)
As we now use the unified CI workflow (#326), it seems we unfortunately [can't have separate badges for each OS](https://github.community/t/separate-workflow-badges-when-using-matrix-testing-possible/16708). As the display of the badges was to reference the cross-platform nature of the project, imo it can be replaced by adding a reference in the introduction instead.
2022-01-13 03:44:07 +02:00
Vinpasso
5cb7398a24 [Example] Disable JSON tests being included in ctest (#329)
* Disable JSON tests being included in ctest

If `CPMAddPackage` includes json without setting JSON_BuildTests off first then the target's ctest will include lots of json's tests.

* Bump example JSON version to avoid JSON tests
2022-01-12 20:29:59 +01:00
Borislav Stanimirov
cef108e86e WiP for source cache test 2022-01-12 17:12:01 +02:00
Borislav Stanimirov
f7ccbcd8a8 test_update_single_package 2022-01-12 14:28:42 +02:00
Borislav Stanimirov
d23788c5b1 Style 2022-01-12 13:45:29 +02:00
Borislav Stanimirov
0ddac3b0f0 Style 2022-01-12 12:53:22 +02:00
Borislav Stanimirov
aec0f0d79a Added test for CPM-specific CMakeCache values 2022-01-12 12:18:43 +02:00
Borislav Stanimirov
058eabe0d2 Enrich CMakeCache class with more CPM data 2022-01-12 11:21:38 +02:00
Borislav Stanimirov
80cc580e32 Windows-latest-latest 2022-01-12 09:18:04 +02:00
Borislav Stanimirov
5b162bedc1 Custom assertion for a success of CommandResult 2022-01-12 08:39:06 +02:00
Borislav Stanimirov
7c9c42fad6 Allow relative integration test dir from env 2022-01-12 08:17:58 +02:00
Borislav Stanimirov
6f14e4d1b2 Use an in-source integration test directory 2022-01-12 08:13:35 +02:00
Borislav Stanimirov
6ef5dfda5e Add integration tests to CI 2022-01-12 07:35:43 +02:00
Borislav Stanimirov
caeaf29440 Allow running of tests from any dir 2022-01-12 07:34:33 +02:00
Borislav Stanimirov
e3ffa2c1ff Separate class with utils for cache (no longer pure Hash) 2022-01-12 07:31:59 +02:00
Borislav Stanimirov
4c9ee1fedb Allow user-provided integration test dir. Allow reuse 2022-01-12 06:45:47 +02:00
Borislav Stanimirov
473e7bf820 Latest Format.cmake. Passing style 2022-01-12 06:26:08 +02:00
Borislav Stanimirov
b30bdc6a18 Merge remote-tracking branch 'origin/master' into integration-tests 2022-01-12 05:35:55 +02:00
Borislav Stanimirov
262f1e0602 Unified GitHub workflow for tests on major operating systems (#326) 2022-01-11 21:16:04 +01:00
Borislav Stanimirov
10c24fc8af First integration test 2022-01-11 07:51:46 +02:00
Borislav Stanimirov
77eb0e9f73 Parse CMakeCache. Separate lib 2022-01-10 10:52:48 +02:00
Borislav Stanimirov
57386e73e8 Alternative approach. Using ruby's test/unit 2022-01-10 07:47:17 +02:00
Borislav Stanimirov
dbb018ef6b First check 2022-01-06 10:35:06 +02:00
Borislav Stanimirov
2830b7046d Piecewise building of CMakeLists 2022-01-06 09:26:07 +02:00
Borislav Stanimirov
c74a739caf Some experimental code to setup tests 2022-01-06 09:26:07 +02:00
Borislav Stanimirov
d50daa3698 Initial commit for integration tests. Experimental. Playing with potential syntax 2022-01-06 09:26:07 +02:00
Dan Raviv
7cbef3efc8 Fix comment out-of-sync with modified code (#321) 2022-01-06 08:46:54 +02:00
DNKpp
939123d1b4 Fix <package>_SOURCE_DIR and _BINARY_DIR handling when caching is active (#314)
* fix: use CACHE variables instead relying on FetchContents mechanism

* apply cmake-format

Signed-off-by: DNKpp <DNKpp2011@gmail.com>
v0.34.3
2021-12-30 16:20:37 +01:00
Lars Melchior
22078d5e0d add quotes around module arguments (#313) 2021-12-30 15:20:16 +02:00
Pavel Sokolov
96c268827b Pass DOWNLOAD_ONLY flag when CPM_pkg_SOURCE is set. (#308)
https://github.com/cpm-cmake/CPM.cmake/issues/307
v0.34.2
2021-12-15 21:23:18 +01:00
Lars Melchior
dad37fbe4e Change example ordering and add note on boost (#305)
Reorders examples from simple to more complex. Also adds note on using `CPM_SOURCE_CACHE` for boost.
2021-12-12 15:09:50 +01:00
Lars Melchior
fed5f8e8a2 use official boost release (#304) v0.34.1 2021-12-05 16:08:47 +01:00
Lars Melchior
d65613e860 add warning when not using release version of CPM.cmake (#303) 2021-12-05 16:08:02 +01:00
Lars Melchior
718ea71759 Allow passing lists in the options (#302)
* allow list options by passing option parameter as string, not value

* add test

* remove debug message

* run formatter
2021-12-05 16:07:20 +01:00
Lars Melchior
6491382204 Remove travis badge from readme (#289)
Follow up on #283 to remove the now obsolete travis badge.
2021-09-29 13:48:40 +03:00
pgorgon-hem
634800c619 Added directory inside cache to make it shown more friendly in CLion (#268)
* Added directory inside cache to make it shown more friendly in CLion

* Changed hash generation to omit collision with old cache scheme. Removed moving old directory for compatibility reason.

* Added CPM_USE_NAMED_CACHE_DIRECTORIES option

* Fixed formatting

* Added description of CPM_USE_NAMED_CACHE_DIRECTORIES into README.md

Co-authored-by: Paweł Gorgoń <pgorgon@hem-e.com>
v0.34.0
2021-09-15 21:39:31 +02:00
Andrea Barbadoro
f552da96bd Detecting when the cache is dirty (#284)
* Check that the cache working directory is clean

* cpm_check_working_dir_is_clean for non git repo will not terminate cmake

* sileneced check for git repo, in case of error

* style(CPM.cmake): fixed indentation for ERROR_QUIET

* refactor(CPM.cmake): added logic to handle a cache folder inside a (not correlated) git repo

this is accomplished by checking if we are in the directory where .git lives

* style(CPM.cmake): stray tab to spaces

* test(dirty-cache-check): added unit test to check cpm_check_working_dir_is_clean

the test creates a file in a folder and then uses git to create a repo in that folder, to check various conditions

* Update test/unit/dirty-cache-check.cmake

added user.name and user.email to comply with test machine where git is not completely configured

Co-authored-by: Lars Melchior <TheLartians@users.noreply.github.com>

* feat(cpm_check_working_dir_is_clean): now it takes a git tag (works with hashes too) to check for uncommitted and commited changes

* refactor(cpm_check_working_dir_is_clean): early return for the most common case of uncommited changes in a repo

* refactor(cpm_check_git_working_dir_is_clean): removed edgecase detection (a non-git folder in an unrelated git repo)

now the contract is that com_check_git_working_dir_is_clean is given the base folder of a git repo

Co-authored-by: Andrew Gribble <ag131012@renishaw.com>
Co-authored-by: Lars Melchior <TheLartians@users.noreply.github.com>
v0.33.0
2021-09-15 11:38:49 +02:00
Olivier Le Doeuff
ea6a8eb895 Fix CPMAddPackage when FetchContent_MakeAvailable already added package (#288)
Add fetchcontent_dependency unit test:
* This test should highlight the fact that cpm_add_subdirectory is always called, even when
  cpm_fetch_package isn't populating the dependency
* NO_CACHE YES highlight a bug introduced in 32b063eba5 where
  cpm_fetch_package was checking undefined ${lower_case_name}_POPULATED variable

https://github.com/cpm-cmake/CPM.cmake/issues/287
v0.32.3
2021-08-29 22:02:18 +02:00
MixusMinimax
a5c22bf6e8 use quotes for CPM_FILE when creating FIND.cmake (#286) 2021-08-29 22:01:50 +02:00