Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
env:
CXX: ${{matrix.cxx_compiler}}
CC: ${{matrix.cc_compiler}}
CMAKE_CXX_STANDARD: ${{matrix.cxx_std}}
OPENEXR_VERSION: ${{matrix.openexr_ver}}

steps:
Expand Down Expand Up @@ -74,6 +73,7 @@ jobs:
-B build
-S .
-D RTA_CENTOS7_CERES_HACK=ON
-D CMAKE_CXX_STANDARD=${{matrix.cxx_std}}

- name: Build
run: |
Expand Down Expand Up @@ -128,7 +128,6 @@ jobs:
env:
CXX: ${{matrix.cxx_compiler}}
CC: ${{matrix.cc_compiler}}
CMAKE_CXX_STANDARD: ${{matrix.cxx_std}}

steps:
- uses: actions/checkout@v4
Expand All @@ -152,6 +151,7 @@ jobs:
run: >
cmake -B build -S .
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
-D CMAKE_CXX_STANDARD=${{matrix.cxx_std}}

- name: Build
run: |
Expand All @@ -168,6 +168,7 @@ jobs:
-B build_config_test
-S ./unittest/config_tests
-D RAWTOACES_DIR=${{ github.workspace }}/install/lib/cmake/RAWTOACES
-D CMAKE_CXX_STANDARD=${{matrix.cxx_std}}

- name: Build config_tests
run: >
Expand Down Expand Up @@ -246,7 +247,7 @@ jobs:
-B build
-S ${{ github.workspace }}
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
-D CXX_STANDARD=C++17
-D CMAKE_CXX_STANDARD=17
-D CMAKE_TOOLCHAIN_FILE="${{ matrix.toolchain_file }}"
-D ENABLE_SHARED="${{ matrix.build_shared_libs }}"

Expand All @@ -268,6 +269,7 @@ jobs:
-S ${{ github.workspace }}/unittest/config_tests
-D RAWTOACES_DIR=${{ github.workspace }}/install/lib/cmake/RAWTOACES
-D CMAKE_TOOLCHAIN_FILE="${{ matrix.toolchain_file }}"
-D CMAKE_CXX_STANDARD=17

- name: Build config_tests
run: >
Expand Down
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
cmake_minimum_required(VERSION 3.11)
project( RAWTOACES )

if( NOT DEFINED CMAKE_CXX_STANDARD )
set(CMAKE_CXX_STANDARD 17)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set( RAWTOACES_MAJOR_VERSION 1 )
set( RAWTOACES_MINOR_VERSION 1 )
set( RAWTOACES_PATCH_VERSION 0 )
Expand All @@ -18,8 +23,8 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
endif()

if (NOT CONFIGURED_ONCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${warnings}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${warnings}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${warnings}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${warnings}")
endif()

## Make install directories overridable
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ $ sudo apt-get -f cmake
$ build_scripts/install_aces_container.bash
$ sudo apt-get -f install \
libimath-dev \
libboost-dev libboost-filesystem-dev \
libboost-dev \
libboost-system-dev \
libboost-test-dev \
libraw-dev libceres-dev
```
Expand Down Expand Up @@ -93,7 +94,6 @@ $ vcpkg install \
imath:x64-windows \
boost-system:x64-windows \
boost-foreach:x64-windows \
boost-filesystem:x64-windows \
boost-test:x64-windows \
boost-property-tree:x64-windows
```
Expand Down
3 changes: 2 additions & 1 deletion build_scripts/install_deps_linux.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ time sudo apt-get update

time sudo apt-get -q -f install -y \
libimath-dev \
libboost-dev libboost-filesystem-dev \
libboost-dev \
libboost-system-dev \
libboost-test-dev \
libraw-dev libceres-dev
1 change: 0 additions & 1 deletion build_scripts/install_deps_windows.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ vcpkg install \
imath:x64-windows \
boost-system:x64-windows \
boost-foreach:x64-windows \
boost-filesystem:x64-windows \
boost-test:x64-windows \
boost-property-tree:x64-windows
2 changes: 1 addition & 1 deletion config/RAWTOACESConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ find_dependency ( Eigen3 )
find_dependency ( Ceres )
find_dependency ( libraw )
find_dependency ( Imath )
find_dependency ( Boost COMPONENTS system filesystem )
find_dependency ( Boost COMPONENTS system )

check_required_components(rawtoaces)
3 changes: 1 addition & 2 deletions configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_INSTALL_PREFIX}/share/CMake"
find_package ( AcesContainer CONFIG REQUIRED )
find_package ( Eigen3 CONFIG REQUIRED )
find_package ( Imath CONFIG REQUIRED )
find_package ( Boost REQUIRED
find_package ( Boost CONFIG REQUIRED
COMPONENTS
system
filesystem
unit_test_framework
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you of this:

The goal is to prefer CMake package config (vcpkg/Conan), fall back to FindBoost for distro installs

find_package ( Boost         CONFIG QUIET
    COMPONENTS
        system
        unit_test_framework
)
if (NOT Boost_FOUND)
    find_package ( Boost REQUIRED
        COMPONENTS
            system
            unit_test_framework
    )
endif()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too worried about this. Boost is going away in the next couple of PRs. Definitely before the next release.


Expand Down
18 changes: 12 additions & 6 deletions include/rawtoaces/define.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@

#include <string>
#include <algorithm>
#include <boost/filesystem.hpp>
#include <filesystem>
#include <iostream>
#include <vector>

#ifndef WIN32
# include <sys/stat.h>
Expand Down Expand Up @@ -344,13 +345,18 @@ inline vector<string> openDir( string path = "." )
{
vector<string> paths;

if ( boost::filesystem::exists( path ) )
if ( std::filesystem::exists( path ) )
{
for ( auto &i: boost::filesystem::directory_iterator( path ) )
if ( std::filesystem::is_directory( path ) )
{
if ( i.status().type() !=
boost::filesystem::file_type::directory_file )
paths.push_back( i.path().string() );
auto it = std::filesystem::directory_iterator( path );
for ( auto filename: it )
{
if ( !std::filesystem::is_directory( filename ) )
{
paths.push_back( filename.path().string() );
}
}
}
}

Expand Down
1 change: 0 additions & 1 deletion src/rawtoaces_idt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ target_link_libraries(
PUBLIC
Boost::boost
Boost::system
Boost::filesystem
Imath::Imath
Imath::ImathConfig
Eigen3::Eigen
Expand Down
6 changes: 3 additions & 3 deletions src/rawtoaces_util/acesrender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

#include <aces/aces_Writer.h>

#include <mutex>

#ifndef WIN32
# include <fcntl.h>
# include <sys/mman.h>
Expand All @@ -19,8 +21,6 @@
using namespace std;
using namespace boost::property_tree;

#include <boost/filesystem.hpp>

// =====================================================================
// Prepare the matching between string flags and single character flag
//
Expand Down Expand Up @@ -954,7 +954,7 @@ vector<string> findFiles( string filePath, vector<string> searchPaths )
{
string path = i + "/" + filePath;

if ( boost::filesystem::exists( path ) )
if ( std::filesystem::exists( path ) )
foundFiles.push_back( path );
}

Expand Down
1 change: 0 additions & 1 deletion unittest/config_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ endif()
find_package ( Boost REQUIRED
COMPONENTS
system
filesystem
unit_test_framework
)

Expand Down
1 change: 0 additions & 1 deletion unittest/config_tests/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ target_link_libraries(
PUBLIC
rawtoaces_idt
Boost::boost
Boost::filesystem
Boost::unit_test_framework
)

Expand Down
1 change: 0 additions & 1 deletion unittest/config_tests/core/core_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
#include <boost/filesystem.hpp>
#include <boost/test/tools/floating_point_comparison.hpp>

#include <rawtoaces/define.h>
Expand Down
1 change: 0 additions & 1 deletion unittest/config_tests/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ target_link_libraries(
PUBLIC
rawtoaces_util
Boost::boost
Boost::filesystem
Boost::unit_test_framework
)

Expand Down
6 changes: 3 additions & 3 deletions unittest/config_tests/util/util_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
#include <boost/filesystem.hpp>
#include <filesystem>
#include <boost/test/tools/floating_point_comparison.hpp>

#include <rawtoaces/acesrender.h>
Expand All @@ -33,9 +33,9 @@ BOOST_AUTO_TEST_CASE( Test_AcesRender )

const int argc = sizeof( argv ) / sizeof( argv[0] );

boost::filesystem::path pathToRaw = boost::filesystem::absolute(
std::filesystem::path pathToRaw = std::filesystem::absolute(
"../../unittest/materials/blackmagic_cinema_camera_cinemadng.dng" );
BOOST_CHECK( boost::filesystem::exists( pathToRaw ) );
BOOST_CHECK( std::filesystem::exists( pathToRaw ) );

std::cerr << "IMAGE PATH " << pathToRaw.string() << std::endl;

Expand Down
22 changes: 11 additions & 11 deletions unittest/testDNGIdt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
#include <boost/filesystem.hpp>
#include <filesystem>
#include <boost/test/tools/floating_point_comparison.hpp>

#include <rawtoaces/rta.h>
Expand Down Expand Up @@ -50,8 +50,8 @@ BOOST_AUTO_TEST_CASE( TestIDT_LightSourceToColorTemp )

BOOST_AUTO_TEST_CASE( TestIDT_XYZToColorTemperature )
{
LibRaw rawProcessor;
boost::filesystem::path pathToRaw = boost::filesystem::absolute(
LibRaw rawProcessor;
std::filesystem::path pathToRaw = std::filesystem::absolute(
"../../unittest/materials/blackmagic_cinema_camera_cinemadng.dng" );
int ret = rawProcessor.open_file( ( pathToRaw.string() ).c_str() );
ret = rawProcessor.unpack();
Expand All @@ -69,8 +69,8 @@ BOOST_AUTO_TEST_CASE( TestIDT_XYZToColorTemperature )

BOOST_AUTO_TEST_CASE( TestIDT_XYZtoCameraWeightedMatrix )
{
LibRaw rawProcessor;
boost::filesystem::path pathToRaw = boost::filesystem::absolute(
LibRaw rawProcessor;
std::filesystem::path pathToRaw = std::filesystem::absolute(
"../../unittest/materials/blackmagic_cinema_camera_cinemadng.dng" );
int ret = rawProcessor.open_file( ( pathToRaw.string() ).c_str() );
ret = rawProcessor.unpack();
Expand All @@ -91,8 +91,8 @@ BOOST_AUTO_TEST_CASE( TestIDT_XYZtoCameraWeightedMatrix )

BOOST_AUTO_TEST_CASE( TestIDT_FindXYZtoCameraMtx )
{
LibRaw rawProcessor;
boost::filesystem::path pathToRaw = boost::filesystem::absolute(
LibRaw rawProcessor;
std::filesystem::path pathToRaw = std::filesystem::absolute(
"../../unittest/materials/blackmagic_cinema_camera_cinemadng.dng" );
int ret = rawProcessor.open_file( ( pathToRaw.string() ).c_str() );
ret = rawProcessor.unpack();
Expand Down Expand Up @@ -142,8 +142,8 @@ BOOST_AUTO_TEST_CASE( TestIDT_MatrixRGBtoXYZ )
BOOST_AUTO_TEST_CASE( TestIDT_GetDNGCATMatrix )
{

LibRaw rawProcessor;
boost::filesystem::path pathToRaw = boost::filesystem::absolute(
LibRaw rawProcessor;
std::filesystem::path pathToRaw = std::filesystem::absolute(
"../../unittest/materials/blackmagic_cinema_camera_cinemadng.dng" );
int ret = rawProcessor.open_file( ( pathToRaw.string() ).c_str() );
ret = rawProcessor.unpack();
Expand All @@ -164,8 +164,8 @@ BOOST_AUTO_TEST_CASE( TestIDT_GetDNGCATMatrix )
BOOST_AUTO_TEST_CASE( TestIDT_GetDNGIDTMatrix )
{

LibRaw rawProcessor;
boost::filesystem::path pathToRaw = boost::filesystem::absolute(
LibRaw rawProcessor;
std::filesystem::path pathToRaw = std::filesystem::absolute(
"../../unittest/materials/blackmagic_cinema_camera_cinemadng.dng" );
int ret = rawProcessor.open_file( ( pathToRaw.string() ).c_str() );
ret = rawProcessor.unpack();
Expand Down
Loading
Loading