Skip to content

Commit

Permalink
[fix] windows build - fix linkage errors
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Dukhovnikov <[email protected]>
  • Loading branch information
antond-weta committed Nov 11, 2023
1 parent 4023923 commit 28adaae
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set( CMAKE_MACOSX_RPATH 1 )

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# set(warnings "/W4 /WX /EHsc")
add_compile_options ( /w0 )
add_compile_options ( /W0 )
add_compile_definitions( NOMINMAX )
endif()

Expand Down
2 changes: 1 addition & 1 deletion include/rawtoaces/define.h
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ inline vector < string > openDir ( string path = "." ) {
for (auto & i : boost::filesystem::directory_iterator(path))
{
if (i.status().type() != boost::filesystem::file_type::directory_file)
paths.push_back(i.path().c_str());
paths.push_back(i.path().string());
}

return paths;
Expand Down
5 changes: 5 additions & 0 deletions unittest/testIDT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
// THAN A.M.P.A.S., WHETHER DISCLOSED OR UNDISCLOSED.
///////////////////////////////////////////////////////////////////////////

#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif

#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
#include <boost/filesystem.hpp>
Expand Down
6 changes: 6 additions & 0 deletions unittest/testMath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
// THAN A.M.P.A.S., WHETHER DISCLOSED OR UNDISCLOSED.
///////////////////////////////////////////////////////////////////////////

#ifdef WIN32
# define WIN32_LEAN_AND_MEAN
# include<windows.h>
# undef RGB
#endif

#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
Expand Down
5 changes: 5 additions & 0 deletions unittest/testSpst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
// THAN A.M.P.A.S., WHETHER DISCLOSED OR UNDISCLOSED.
///////////////////////////////////////////////////////////////////////////

#ifdef WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif

#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
#include <boost/filesystem.hpp>
Expand Down

0 comments on commit 28adaae

Please sign in to comment.