Commit 8700c3a5 authored by Victor Poughon's avatar Victor Poughon

Merge branch 'tixml-cmakedefine2' into 'develop'

BUG: better check for TIXML_USE_STL

See merge request orfeotoolbox/otb!637
parents 25e76aad 9f0fcd95
Pipeline #3069 passed with stages
in 6 minutes and 39 seconds
......@@ -21,13 +21,17 @@
project(OTBTinyXML)
# Check if we need to define TIXML_USE_STL
try_compile( TIXML_USE_STL
try_compile( TIXML_TEST_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)
if (NOT TIXML_TEST_STL)
message(FATAL_ERROR "TIXML must be compiled with TIXML_USE_STL=ON.")
endif()
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"
......
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