Skip to content

Commit

Permalink
Better test package
Browse files Browse the repository at this point in the history
  • Loading branch information
AbrilRBS committed Apr 26, 2024
1 parent 30125a5 commit 1369f39
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion recipes/dispenso/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd, valid_min_cppstd
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import copy, get, export_conandata_patches, apply_conandata_patches, rm, rmdir
from conan.tools.scm import Version
Expand Down
2 changes: 0 additions & 2 deletions recipes/dispenso/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@ project(test_package LANGUAGES CXX)
find_package(Dispenso REQUIRED CONFIG)

add_executable(${PROJECT_NAME} test_package.cpp)
# don't link to ${CONAN_LIBS} or CONAN_PKG::package
target_link_libraries(${PROJECT_NAME} PRIVATE Dispenso::dispenso)
# In case the target project need a specific C++ standard
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)
1 change: 0 additions & 1 deletion recipes/dispenso/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import os


# It will become the standard on Conan 2.x
class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
Expand Down
8 changes: 4 additions & 4 deletions recipes/dispenso/all/test_package/test_package.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include <iostream>
#include "dispenso/platform.h"
#include "dispenso/parallel_for.h"


int main(void) {
std::cout << DISPENSO_MAJOR_VERSION << "." << DISPENSO_MINOR_VERSION << std::endl;

return EXIT_SUCCESS;
dispenso::parallel_for(0, 5, [] (size_t j) {
std::cout << j << std::endl;
});
}

0 comments on commit 1369f39

Please sign in to comment.