Skip to content

Commit

Permalink
feat: update to boost 1.82 (#106)
Browse files Browse the repository at this point in the history
Co-authored-by: Vishwa Shah <[email protected]>
  • Loading branch information
vishwa2710 and vishwaLoft authored Apr 21, 2023
1 parent 3af388c commit debefb1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,12 @@ ENDFOREACH ()

## Dependencies

### Boost [1.69.0]
### Boost [1.82.0]

SET (Boost_USE_STATIC_LIBS ON)
SET (Boost_USE_MULTITHREADED ON)

FIND_PACKAGE ("Boost" "1.69" REQUIRED COMPONENTS "system" "filesystem" "regex" "log")
FIND_PACKAGE ("Boost" "1.82" REQUIRED COMPONENTS "system" "filesystem" "regex" "log")

IF (NOT Boost_FOUND)
MESSAGE (SEND_ERROR "[Boost] not found.")
Expand Down Expand Up @@ -298,7 +298,7 @@ IF (BUILD_SHARED_LIBRARY)

TARGET_LINK_LIBRARIES (${SHARED_LIBRARY_TARGET} "stdc++")
TARGET_LINK_LIBRARIES (${SHARED_LIBRARY_TARGET} "pthread")
TARGET_LINK_LIBRARIES (${SHARED_LIBRARY_TARGET} "Boost::date_time" "Boost::filesystem" "Boost::log")
TARGET_LINK_LIBRARIES (${SHARED_LIBRARY_TARGET} "Boost::filesystem" "Boost::log")
TARGET_LINK_LIBRARIES (${SHARED_LIBRARY_TARGET} "yaml-cpp")

SET_TARGET_PROPERTIES ( ${SHARED_LIBRARY_TARGET} PROPERTIES
Expand Down Expand Up @@ -329,7 +329,7 @@ IF (BUILD_STATIC_LIBRARY)
TARGET_INCLUDE_DIRECTORIES (${STATIC_LIBRARY_TARGET} PUBLIC "${PROJECT_SOURCE_DIR}/include/")

TARGET_LINK_LIBRARIES (${STATIC_LIBRARY_TARGET} "pthread")
TARGET_LINK_LIBRARIES (${STATIC_LIBRARY_TARGET} "Boost::date_time" "Boost::filesystem" "Boost::log")
TARGET_LINK_LIBRARIES (${STATIC_LIBRARY_TARGET} "Boost::filesystem" "Boost::log")
TARGET_LINK_LIBRARIES (${STATIC_LIBRARY_TARGET} "yaml-cpp")

SET_TARGET_PROPERTIES (${STATIC_LIBRARY_TARGET} PROPERTIES VERSION ${PROJECT_VERSION_STRING} OUTPUT_NAME ${SHARED_LIBRARY_NAME} CLEAN_DIRECT_OUTPUT 1 INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN/")
Expand Down Expand Up @@ -357,7 +357,7 @@ IF (BUILD_UTILITY)
TARGET_INCLUDE_DIRECTORIES (${UTILITY_TARGET} PUBLIC "${PROJECT_SOURCE_DIR}/include/")

TARGET_LINK_LIBRARIES (${UTILITY_TARGET} "pthread")
TARGET_LINK_LIBRARIES (${UTILITY_TARGET} "Boost::date_time" "Boost::filesystem" "Boost::log")
TARGET_LINK_LIBRARIES (${UTILITY_TARGET} "Boost::filesystem" "Boost::log")
TARGET_LINK_LIBRARIES (${UTILITY_TARGET} ${SHARED_LIBRARY_TARGET})

SET_TARGET_PROPERTIES (${UTILITY_TARGET} PROPERTIES VERSION ${PROJECT_VERSION_STRING} OUTPUT_NAME ${SHARED_LIBRARY_NAME} CLEAN_DIRECT_OUTPUT 1 INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN/")
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSpaceToolkit/Core/FileSystem/Directory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ void Directory::create (
directoryPathString += "/" ;
}

if (!boost::filesystem::create_directories(boost::filesystem::path(directoryPathString).branch_path()))
if (!boost::filesystem::create_directories(boost::filesystem::path(directoryPathString).parent_path()))
{
throw ostk::core::error::RuntimeError("Cannot create directory [{}].", this->toString()) ;
}
Expand Down
2 changes: 1 addition & 1 deletion test/OpenSpaceToolkit/Core/FileSystem/Path.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ TEST (OpenSpaceToolkit_Core_FileSystem_Path, GetNormalizedPath)
EXPECT_EQ(Path::Parse("/"), Path::Parse("/").getNormalizedPath()) ;
EXPECT_EQ(Path::Parse("/abc"), Path::Parse("/abc").getNormalizedPath()) ;
EXPECT_EQ(Path::Parse("/app"), Path::Parse("/app").getNormalizedPath()) ;
EXPECT_EQ(Path::Parse("/app"), Path::Parse("/app/").getNormalizedPath()) ;
EXPECT_EQ(Path::Parse("/app/"), Path::Parse("/app/").getNormalizedPath()) ;
EXPECT_EQ(Path::Parse("/app/build"), Path::Parse("/app/build").getNormalizedPath()) ;
EXPECT_EQ(Path::Parse("/app/build/Makefile"), Path::Parse("/app/build/Makefile").getNormalizedPath()) ;

Expand Down

0 comments on commit debefb1

Please sign in to comment.