-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows build #78
Windows build #78
Conversation
simogasp
commented
Jun 15, 2018
•
edited by fabiencastan
Loading
edited by fabiencastan
- port the cpu part on windows (MSVC)
- replace boost thread by std thread
- replace custom code for backtrace with boost::stacktrace
avoid min max macro declaration
@@ -17,7 +17,7 @@ bool Mgmt::Measurement::doPrint( ) const | |||
|
|||
void Mgmt::Measurement::print( std::ostream& ostr ) const | |||
{ | |||
if( not _probe ) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not that windows doesn't support "not", it's that gcc and clang are too lax. You must include <iso646.h>
to get and/not/etc. "keywords".
Ah I thought they were like the other keywords, I didn't know they come/u
need them from a header. That's cool then, personally I'd prefer to use
`and not or` as they are more readable.
I can revert the commit and just add the missing header if everybody agrees.
@fabiencastan
@griwodz
@yann-lty
|
I would prefer to not mix multiple ways to do the same thing. We should use standard symbols as it's done everywhere in our libs. But you can do it in Meshroom (in python) ;) |
I agree with Fabien, using |
for some reason vc complains, it's better to get rid of boost exception and use the stardard ones, i don't see the point
INSTALL.md
Outdated
@@ -20,12 +20,13 @@ $ git clone https://github.com/alicevision/CCTag.git | |||
Most of the dependencies can be installed from the common repositories (apt, yum etc): | |||
|
|||
- Eigen3 (libeigen3-dev) | |||
- Boost >= 1.53 ([core, thread, system, filesystem, serialization, thread, exception, chrono, date-time, program-options, timer]-dev) | |||
- Boost >= 1.53 ([accumulators, atomic, chrono, core, date-time, exception, filesystem, math, program-options, ptr-container, system, serialization, timer, thread]-dev) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stacktrace?
# Windows requires more work, and Mac is probably still hopeless. | ||
cmake_minimum_required(VERSION 3.4) | ||
# Version 3.14 is needed for boost-stacktrace | ||
cmake_minimum_required(VERSION 3.14) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.14 is overkilling, 3.5 is the first one with Boost:boost targets
|
||
set(CUDA_cpp "") | ||
|
||
message( STATUS "Declare CCTag library" ) | ||
add_library(CCTag ${CCTag_cpp}) | ||
set_target_properties(CCTag PROPERTIES VERSION ${PROJECT_VERSION}) | ||
|
||
target_include_directories(CCTag | ||
target_include_directories(CCTag | ||
PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>" | ||
"$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" | ||
PUBLIC ${Boost_INCLUDE_DIRS} ${Eigen_INCLUDE_DIR} ${OpenCV_INCLUDE_DIRS} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${Boost_INCLUDE_DIRS} can now be removed. When you specify the target Boost::boost in target_link_libraries()
it automagically add the relevant includes and definitions
@@ -1,12 +1,12 @@ | |||
cmake_minimum_required(VERSION 3.4) | |||
cmake_minimum_required(VERSION 3.14) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${OpenCV_LIBS} | ||
Boost::filesystem Boost::timer | ||
) | ||
|
||
if(IL_FOUND OR DevIL_FOUND) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe replace them with DevIL_FOUND
To be more coherent with the other parts. It was the only place where BOOST_THROW_EXCEPTION was used.
4d2b9dc
to
ee16bc5
Compare
Needed to avoid build errors with boost exception and MSVC.
4d2b9dc
to
cdd97d2
Compare