Permalink
Browse files

mrpt::to_string() is not defined for enum classes

  • Loading branch information...
jolting committed Oct 7, 2018
1 parent bf83dae commit 0ce2fecc0a1e33ed49db4647dc445ad1936a38a0
@@ -254,7 +254,7 @@ void CCanvas::selectTextFont(const std::string& fontName)
void CCanvas::drawImage(int x, int y, const mrpt::img::CImage& img)
{
MRPT_START
ASSERT_EQUAL_(img.getPixelDepth(), mrpt::img::PixelDepth::D8U);
ASSERT_(img.getPixelDepth() == mrpt::img::PixelDepth::D8U);

int img_lx = img.getWidth();
int img_ly = img.getHeight();
@@ -1316,7 +1316,7 @@ void CImage::setPixel(int x, int y, size_t color)
#if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG)
ASSERT_(ipl);
#endif
ASSERT_EQUAL_(this->getPixelDepth(), mrpt::img::PixelDepth::D8U);
ASSERT_(this->getPixelDepth() == mrpt::img::PixelDepth::D8U);

if (x >= 0 && y >= 0 && y < ipl->height && x < ipl->width)
{
@@ -181,7 +181,7 @@ void CTexturedObject::loadTextureInOpenGL() const
}

// Reserve the new one --------------------------
ASSERT_EQUAL_(m_textureImage.getPixelDepth(), mrpt::img::PixelDepth::D8U);
ASSERT_(m_textureImage.getPixelDepth() == mrpt::img::PixelDepth::D8U);

// allocate texture names:
m_glTextureName = getNewTextureNumber();
@@ -1,5 +1,5 @@
# File generated automatically. Build with cmake . at the root directory
PROJECT(ALL_EXAMPLES)
project(ALL_EXAMPLES)

add_custom_target(examples ALL)

@@ -4,52 +4,52 @@
# Run with "ccmake ." at the root directory, or use it as a template for
# starting your own programs
#-----------------------------------------------------------------------------------------------
SET(sampleName @CMAKE_MRPT_EXAMPLE_NAME@)
PROJECT(EXAMPLE_${sampleName})
set(sampleName @CMAKE_MRPT_EXAMPLE_NAME@)
project(EXAMPLE_${sampleName})

CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
cmake_minimum_required(VERSION 3.1)
cmake_policy(SET CMP0003 NEW) # Required by CMake 2.7+

# ---------------------------------------------------------------------------
# Set the output directory of each example to its corresponding subdirectory
# in the binary tree:
# ---------------------------------------------------------------------------
SET(EXECUTABLE_OUTPUT_PATH ".")
set(EXECUTABLE_OUTPUT_PATH ".")

# The list of "libs" which can be included can be found in:
# http://www.mrpt.org/Libraries
# Add the top-level dependencies only.
# --------------------------------------------------------------------------
FIND_PACKAGE(MRPT REQUIRED @CMAKE_EXAMPLE_DEPS_STRIP@)
find_package(MRPT REQUIRED @CMAKE_EXAMPLE_DEPS_STRIP@)

# Define the executable target:
ADD_EXECUTABLE(${sampleName} test.cpp @CMAKE_EXAMPLE_EXTRA_SRCS@ )
add_executable(${sampleName} test.cpp @CMAKE_EXAMPLE_EXTRA_SRCS@ )

ADD_DEPENDENCIES(examples ${sampleName})
add_dependencies(examples ${sampleName})

SET_TARGET_PROPERTIES(
set_target_properties(
${sampleName}
PROPERTIES
PROJECT_LABEL "(EXAMPLE) ${sampleName}")

# Add special defines needed by this example, if any:
SET(MY_DEFS @CMAKE_EXAMPLE_EXTRA_DEFINES@)
IF(MY_DEFS) # If not empty
ADD_DEFINITIONS("-D${MY_DEFS}")
ENDIF()
set(MY_DEFS @CMAKE_EXAMPLE_EXTRA_DEFINES@)
if(MY_DEFS) # If not empty
add_definitions("-D${MY_DEFS}")
endif()

# Add the required libraries for linking:
TARGET_LINK_LIBRARIES(${sampleName}
${MRPT_LIBRARIES} # This is filled by FIND_PACKAGE(MRPT ...)
target_link_libraries(${sampleName}
${MRPT_LIBRARIES} # This is filled by find_package(MRPT ...)
)

# Set optimized building:
IF((${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX) AND NOT CMAKE_BUILD_TYPE MATCHES "Debug")
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX) AND NOT CMAKE_BUILD_TYPE MATCHES "Debug")
add_compile_options(-O3)
ENDIF()
endif()

# This part can be removed if you are compiling this program outside of
# the MRPT tree:
IF(${CMAKE_PROJECT_NAME} STREQUAL "MRPT") # Fails if build outside of MRPT project.
if(${CMAKE_PROJECT_NAME} STREQUAL "MRPT") # Fails if build outside of MRPT project.
DeclareAppDependencies(${sampleName} @CMAKE_EXAMPLE_DEPS@) # Dependencies
ENDIF()
endif()

1 comment on commit 0ce2fec

@jlblancoc

This comment has been minimized.

Member

jlblancoc commented on 0ce2fec Oct 7, 2018

👍

Please sign in to comment.