Skip to content

Commit

Permalink
findfilesystem, unit test platform agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
mhekkel committed Sep 29, 2021
1 parent 7be15ce commit d115298
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cmake/FindFilesystem.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ if(_found)
set_property(TARGET std::filesystem APPEND PROPERTY INTERFACE_COMPILE_FEATURES cxx_std_17)

if(CXX_FILESYSTEM_NO_LINK_NEEDED)
# Nothing to add...
# Nothing to add...
elseif(CXX_FILESYSTEM_STDCPPFS_NEEDED)
set_property(TARGET std::filesystem APPEND PROPERTY INTERFACE_LINK_LIBRARIES -lstdc++fs)
set_target_properties(std::filesystem PROPERTIES IMPORTED_LIBNAME stdc++fs)
elseif(CXX_FILESYSTEM_CPPFS_NEEDED)
set_property(TARGET std::filesystem APPEND PROPERTY INTERFACE_LINK_LIBRARIES -lc++fs)
set_target_properties(std::filesystem PROPERTIES IMPORTED_LIBNAME c++fs)
endif()
endif()

Expand All @@ -71,3 +71,4 @@ set(Filesystem_FOUND ${_found} CACHE BOOL "TRUE if we can run a program using st
if(Filesystem_FIND_REQUIRED AND NOT Filesystem_FOUND)
message(FATAL_ERROR "Cannot run simple program using std::filesystem")
endif()

2 changes: 1 addition & 1 deletion test/unit-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE(ut_dssp)

writeDSSP(structure, dssp, test);

std::ifstream reference("1cbs.dssp", std::ios::binary);
std::ifstream reference("1cbs.dssp");

BOOST_CHECK(reference.is_open());

Expand Down

0 comments on commit d115298

Please sign in to comment.