Skip to content
This repository has been archived by the owner on Nov 28, 2019. It is now read-only.

Commit

Permalink
Cosmetic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
theirix committed Jan 3, 2018
1 parent ba3bda4 commit e82ab76
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ test_package/__pycache__/*
test_package/build/*
build/*
*.pyc
tmp/

# IDE
.idea/*
5 changes: 2 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ environment:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CONAN_VISUAL_VERSIONS: 15
CONAN_ARCHS: x86_64

install:
- set PATH=%PATH%;%PYTHON%/Scripts/
- pip.exe install conan --upgrade
- pip.exe install conan_package_tools
- conan user # It creates the conan data directory

test_script:
- python build.py

9 changes: 2 additions & 7 deletions test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
project(test_package)
cmake_minimum_required(VERSION 2.8.11)

set(CMAKE_VERBOSE_MAKEFILE TRUE)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()

file(GLOB SOURCE_FILES *.cpp)

add_executable(${PROJECT_NAME} ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS})
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS})
9 changes: 5 additions & 4 deletions test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()

def test(self):
with tools.environment_append(RunEnvironment(self).vars):
bin_path = os.path.join("bin", "test_package")
if self.settings.os == "Windows":
self.run(os.path.join("bin","test_package"))
self.run(bin_path)
elif self.settings.os == "Macos":
self.run("DYLD_LIBRARY_PATH=%s %s"%(os.environ.get('DYLD_LIBRARY_PATH', ''),os.path.join("bin","test_package")))
self.run("DYLD_LIBRARY_PATH=%s %s" % (os.environ.get('DYLD_LIBRARY_PATH', ''), bin_path))
else:
self.run("LD_LIBRARY_PATH=%s %s"%(os.environ.get('LD_LIBRARY_PATH', ''),os.path.join("bin","test_package")))
self.run("LD_LIBRARY_PATH=%s %s" % (os.environ.get('LD_LIBRARY_PATH', ''), bin_path))

0 comments on commit e82ab76

Please sign in to comment.