mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-17 06:37:43 -05:00
Initial version of integration tests (#330)
* Initial commit for integration tests. Experimental. Playing with potential syntax
* Some experimental code to setup tests
* Piecewise building of CMakeLists
* First check
* Alternative approach. Using ruby's test/unit
* Parse CMakeCache. Separate lib
* First integration test
* Latest Format.cmake. Passing style
* Allow user-provided integration test dir. Allow reuse
* Separate class with utils for cache (no longer pure Hash)
* Allow running of tests from any dir
* Add integration tests to CI
* Use an in-source integration test directory
* Allow relative integration test dir from env
* Custom assertion for a success of CommandResult
* Windows-latest-latest
* Enrich CMakeCache class with more CPM data
* Added test for CPM-specific CMakeCache values
* Style
* Style
* test_update_single_package
* WiP for source cache test
* Small source_cache test
* Style
* Moved env clean to cleanup to make setup methods simpler (not require super)
* WiP for integration test documentation
* WiP for integration test documentation
* Project file creation tweaks
* Split docs into multiple files. Complete tutorial. Reference.
* Tips
* Typo
* Setup Ruby inistead of requiring windows-2022
* Revert "Setup Ruby inistead of requiring windows-2022"
This reverts commit 8aa2732145.
This commit is contained in:
committed by
GitHub
parent
a27c66a3ea
commit
c58e98a0a0
7
test/integration/templates/no-deps/lists.in.cmake
Normal file
7
test/integration/templates/no-deps/lists.in.cmake
Normal file
@@ -0,0 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
||||
|
||||
project(no-deps)
|
||||
|
||||
include("%{cpm_path}")
|
||||
|
||||
add_executable(no-deps main.c)
|
||||
6
test/integration/templates/no-deps/main.c
Normal file
6
test/integration/templates/no-deps/main.c
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
puts("Hello");
|
||||
return 0;
|
||||
}
|
||||
13
test/integration/templates/using-adder/lists.in.cmake
Normal file
13
test/integration/templates/using-adder/lists.in.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
||||
|
||||
project(using-adder)
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
include("%{cpm_path}")
|
||||
|
||||
%{packages}
|
||||
|
||||
add_executable(using-adder using-adder.cpp)
|
||||
|
||||
target_link_libraries(using-adder adder)
|
||||
8
test/integration/templates/using-adder/using-adder.cpp
Normal file
8
test/integration/templates/using-adder/using-adder.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <adder/adder.hpp>
|
||||
#include <cstdio>
|
||||
|
||||
int main() {
|
||||
int sum = adder::add(5, 3);
|
||||
std::printf("%d\n", sum);
|
||||
return 0;
|
||||
}
|
||||
13
test/integration/templates/using-fibadder/lists.in.cmake
Normal file
13
test/integration/templates/using-fibadder/lists.in.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
||||
|
||||
project(using-fibadder)
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
include("%{cpm_path}")
|
||||
|
||||
%{packages}
|
||||
|
||||
add_executable(using-fibadder using-fibadder.cpp)
|
||||
|
||||
target_link_libraries(using-fibadder fibadder)
|
||||
@@ -0,0 +1,8 @@
|
||||
#include <cstdio>
|
||||
#include <fibadder/fibadder.hpp>
|
||||
|
||||
int main() {
|
||||
int sum = fibadder::fibadd(6, 7);
|
||||
std::printf("%d\n", sum);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user