Commit 12654b92 authored by Victor Poughon's avatar Victor Poughon

BUG: force TIXML_USE_STL to always true in otb_tinyxml.h

parent 13c6d363
Pipeline #3010 failed with stages
in 113 minutes and 52 seconds
/*
* Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <iostream>
#include <tinyxml.h>
int main(int argc, char* argv[])
{
TiXmlDocument doc( NULL );
std::cout << doc;
}
......@@ -20,14 +20,6 @@
project(OTBTinyXML)
# Check if we need to define TIXML_USE_STL
try_compile( TIXML_USE_STL
${CMAKE_CURRENT_BINARY_DIR}/CMake
${CMAKE_CURRENT_SOURCE_DIR}/CMake/otbTestTinyXMLUseSTL.cxx
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${TINYXML_INCLUDE_DIRS}" "-DLINK_LIBRARIES:STRING=${TINYXML_LIBRARIES}"
COMPILE_DEFINITIONS "-DTIXML_USE_STL"
OUTPUT_VARIABLE OUTPUT)
configure_file( src/otb_tinyxml.h.in src/otb_tinyxml.h )
set(OTBTinyXML_SYSTEM_INCLUDE_DIRS
......
......@@ -21,9 +21,7 @@
#ifndef otb_tinyxml_h
#define otb_tinyxml_h
#ifndef TIXML_USE_STL
#cmakedefine TIXML_USE_STL
#endif
#define TIXML_USE_STL
#include "tinyxml.h"
......
......@@ -26,7 +26,6 @@ option(BUILD_SHARED_LIBS "Building shared libs. Default is ON" ON)
if(MSVC AND BUILD_SHARED_LIBS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
add_definitions(-DTIXML_USE_STL=1)
set(tinyXMLlib_SRCS
tinystr.cpp
......
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