Skip to content

Commit

Permalink
Merge pull request #16 from sameeul/rearrage_files
Browse files Browse the repository at this point in the history
Rearragne directory structure and update symbol visibility
  • Loading branch information
sameeul authored Aug 27, 2024
2 parents f515756 + e12a658 commit 74b5dfe
Show file tree
Hide file tree
Showing 25 changed files with 45 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.16.2 delvewheel wheel
python -m pip install cibuildwheel==2.16.2 delvewheel==1.7.1 wheel
- name: Building wheels
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheel_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.16.2 delvewheel wheel
python -m pip install cibuildwheel==2.16.2 delvewheel==1.7.1 wheel
- name: Building wheels
run: |
Expand Down
40 changes: 26 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,35 @@ project(Argolid)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if(NOT WIN32)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
endif()

include(GNUInstallDirs)
# this is a workaround for GitHub Action for wheelbuiling
if(DEFINED ENV{ARGOLID_DEP_DIR})
set(CMAKE_PREFIX_PATH $ENV{ARGOLID_DEP_DIR})
link_directories($ENV{ARGOLID_DEP_DIR}/${CMAKE_INSTALL_LIBDIR})
endif()
message(STATUS "CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH}")

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

set(CMAKE_CXX_FLAGS_RELEASE "-O2")
set(SOURCE
src/ts_driver/tiled_tiff/omexml.cc
src/ts_driver/tiled_tiff/tiled_tiff_key_value_store.cc
src/ts_driver/ometiff/metadata.cc
src/ts_driver/ometiff/driver.cc
src/ome_tiff_to_chunked_converter.cpp
src/chunked_pyramid_assembler.cpp
src/chunked_base_to_pyr_gen.cpp
src/ome_tiff_to_chunked_pyramid.cpp
src/utilities.cpp
src/pyramid_view.cpp
src/cpp/ts_driver/tiled_tiff/omexml.cc
src/cpp/ts_driver/tiled_tiff/tiled_tiff_key_value_store.cc
src/cpp/ts_driver/ometiff/metadata.cc
src/cpp/ts_driver/ometiff/driver.cc
src/cpp/core/ome_tiff_to_chunked_converter.cpp
src/cpp/core/chunked_pyramid_assembler.cpp
src/cpp/core/chunked_base_to_pyr_gen.cpp
src/cpp/core/ome_tiff_to_chunked_pyramid.cpp
src/cpp/core/pyramid_view.cpp
src/cpp/utilities/utilities.cpp
)

include(FetchContent)
Expand All @@ -52,8 +58,10 @@ find_package(filepattern REQUIRED)
find_package(Threads QUIET)
if (Threads_FOUND)
if (CMAKE_USE_PTHREADS_INIT)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /pthread")
endif()
endif (CMAKE_USE_PTHREADS_INIT)
list(APPEND Build_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
Expand All @@ -66,7 +74,7 @@ find_package(pybind11 CONFIG REQUIRED)

pybind11_add_module(libargolid
${SOURCE}
src/python/pyramid_python_interface.cpp
src/cpp/interface/pyramid_python_interface.cpp
)

# VERSION_INFO is defined by setup.py and passed into the C++ code as a define (VERSION_INFO) here.
Expand All @@ -81,5 +89,9 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_link_libraries(libargolid PRIVATE stdc++fs)
endif()

target_link_libraries(libargolid PRIVATE tensorstore::tensorstore tensorstore::all_drivers filepattern::filepattern)
target_link_libraries(libargolid PRIVATE
tensorstore::tensorstore
tensorstore::all_drivers
filepattern::filepattern
)
target_link_libraries(libargolid PRIVATE ${Build_LIBRARIES})
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "chunked_base_to_pyr_gen.h"
#include "downsample.h"
#include "utilities.h"
#include "../utilities/downsample.h"
#include "../utilities/utilities.h"
#include <plog/Log.h>
#include "plog/Initializers/RollingFileInitializer.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
#include <string>
#include <unordered_map>
#include "BS_thread_pool.hpp"
#include "utilities.h"

#include "../utilities/utilities.h"
namespace argolid{
class ChunkedBaseToPyramid{
public:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "chunked_pyramid_assembler.h"
#include "utilities.h"
#include "../utilities/utilities.h"
#include "pugixml.hpp"
#include "tiffio.h"
#include <plog/Log.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <string>
#include "utilities.h"
#include "../utilities/utilities.h"
#include "BS_thread_pool.hpp"

namespace argolid{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "ome_tiff_to_chunked_converter.h"
#include "utilities.h"

#include "../utilities/utilities.h"
#include <string>
#include <stdint.h>
#include <iostream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <string>
#include "BS_thread_pool.hpp"
#include "utilities.h"
#include "../utilities/utilities.h"
namespace argolid {
class OmeTiffToChunkedConverter{

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "ome_tiff_to_chunked_converter.h"
#include "chunked_pyramid_assembler.h"
#include "chunked_base_to_pyr_gen.h"
#include "utilities.h"
#include "../utilities/utilities.h"
#include "BS_thread_pool.hpp"
#include <plog/Log.h>
#include "plog/Initializers/RollingFileInitializer.h"
Expand Down
2 changes: 1 addition & 1 deletion src/pyramid_view.cpp → src/cpp/core/pyramid_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include "pyramid_view.h"
#include "chunked_base_to_pyr_gen.h"
#include "utilities.h"
#include "../utilities/utilities.h"
#include "pugixml.hpp"
#include <plog/Log.h>
#include "plog/Initializers/RollingFileInitializer.h"
Expand Down
2 changes: 1 addition & 1 deletion src/pyramid_view.h → src/cpp/core/pyramid_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <tuple>
#include <unordered_map>
#include <optional>
#include "utilities.h"
#include "../utilities/utilities.h"
#include "BS_thread_pool.hpp"
namespace argolid{

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "../ome_tiff_to_chunked_pyramid.h"
#include "../pyramid_view.h"
#include "../utilities.h"
#include "../core/ome_tiff_to_chunked_pyramid.h"
#include "../core/pyramid_view.h"
#include "../utilities/utilities.h"
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
namespace py = pybind11;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#include "../../src/ts_driver/ometiff/metadata.h"
#include "metadata.h"

#include "tensorstore/driver/driver.h"
#include "absl/status/status.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#include "../../src/ts_driver/ometiff/metadata.h"
#include "metadata.h"

// ToDo - Clean up headers
#include <iostream>
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../../src/ts_driver/tiled_tiff/omexml.h"
#include "omexml.h"
#include <algorithm>
#include <cctype>
#include <iostream>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../../src/ts_driver/tiled_tiff/omexml.h"
#include "omexml.h"
#include <tiffio.h>
#include <regex>
#include <stddef.h>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 74b5dfe

Please sign in to comment.