Commit 61ab2783 authored by Guillaume Pasero's avatar Guillaume Pasero

COMP: try to do a clean muparserX compat file

parent da47937f
......@@ -158,7 +158,7 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${OTB_REQUIRED_LINK_
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${OTB_REQUIRED_LINK_FLAGS}")
# detect some C++11 keywords
#include(OTBCheckCpp11Keywords)
include(OTBCheckCpp11Keywords)
# TODO BUILD_TESTING is created by default by CTest.cmake, and is ON by default.
option(BUILD_TESTING "Build the testing tree." OFF)
......
......@@ -2,5 +2,32 @@ project(OTBMuParserX)
set(OTBMuParserX_SYSTEM_INCLUDE_DIRS ${MUPARSERX_INCLUDE_DIRS})
set(OTBMuParserX_LIBRARIES "${MUPARSERX_LIBRARIES}")
set(OTBMuParserX_INCLUDE_DIRS ${OTBMuParserX_BINARY_DIR}/src)
# as advised by Ingo Berg : avoid using those #define with MSVC
if(OTB_IS_UNIQUE_PTR_DEFINED OR MSVC)
set(OTB_MUPARSERX_HIDE_UNIQUE_PTR 0)
else()
set(OTB_MUPARSERX_HIDE_UNIQUE_PTR 1)
endif()
if(OTB_IS_OVERRIDE_DEFINED OR MSVC)
set(OTB_MUPARSERX_HIDE_OVERRIDE 0)
else()
set(OTB_MUPARSERX_HIDE_OVERRIDE 1)
endif()
if(OTB_IS_NULLPTR_DEFINED OR MSVC)
set(OTB_MUPARSERX_HIDE_NULLPTR 0)
else()
set(OTB_MUPARSERX_HIDE_NULLPTR 1)
endif()
configure_file( src/mpCompat.h.in src/mpCompat.h )
otb_module_impl()
install(FILES ${OTBMuParserX_BINARY_DIR}/src/mpCompat.h
DESTINATION ${OTBMuParserX_INSTALL_INCLUDE_DIR}
COMPONENT Development
)
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef MUP_COMPAT_H
#define MUP_COMPAT_H
#if @OTB_MUPARSERX_HIDE_OVERRIDE@
#define override
#endif
#if @OTB_MUPARSERX_HIDE_UNIQUE_PTR@
#define unique_ptr auto_ptr
#endif
#if @OTB_MUPARSERX_HIDE_NULLPTR@
#define nullptr NULL
#endif
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment