Skip to content

Commit

Permalink
Code review conan-io#2
Browse files Browse the repository at this point in the history
  • Loading branch information
chusitoo committed Jan 10, 2022
1 parent 4dc7285 commit 65f9ca7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
12 changes: 7 additions & 5 deletions recipes/flatbush/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
cmake_minimum_required(VERSION 3.12)

PROJECT(test_package VERSION 1.0.0 LANGUAGES CXX)
INCLUDE(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
project(test_package VERSION 1.0.0 LANGUAGES CXX)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
find_package(flatbush CONFIG REQUIRED)

ADD_EXECUTABLE(${PROJECT_NAME} "test_package.cpp")
add_executable(${PROJECT_NAME} "test_package.cpp")

TARGET_LINK_LIBRARIES(${PROJECT_NAME} flatbush::flatbush)
target_link_libraries(${PROJECT_NAME} flatbush::flatbush)

set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
9 changes: 0 additions & 9 deletions recipes/flatbush/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ def build(self):
cmake.configure()
cmake.build()

def configure(self):
compiler = self.settings.compiler

if compiler.cppstd:
tools.check_min_cppstd(self, 11)

if (compiler == "gcc" and Version(compiler.version) < 6) or (compiler == "apple-clang" and compiler.cppstd == "None"):
compiler.cppstd = "11"

def test(self):
if not tools.cross_building(self):
bin_path = os.path.join("bin", "test_package")
Expand Down

0 comments on commit 65f9ca7

Please sign in to comment.