Commit 7a9c2342 authored by Daniel Wortmann's avatar Daniel Wortmann

Modified test_XML.cmake to be more fault tolerant (needed on HAZELHEN)

parent 323e2408
...@@ -6,13 +6,14 @@ LINK_LIBRARIES ${FLEUR_LIBRARIES} ...@@ -6,13 +6,14 @@ LINK_LIBRARIES ${FLEUR_LIBRARIES}
if (NOT FLEUR_USE_XML) if (NOT FLEUR_USE_XML)
find_package(LibXml2) find_package(LibXml2)
set(CMAKE_C_FLAGS "-I${LIBXML2_INCLUDE_DIR}") set(CMAKE_C_FLAGS "-I${LIBXML2_INCLUDE_DIR}")
if (${LIBXML2_LIBRARIES})
set(TEST_LIBRARIES ${FLEUR_LIBRARIES} ${LIBXML2_LIBRARIES}) set(TEST_LIBRARIES ${FLEUR_LIBRARIES} ${LIBXML2_LIBRARIES})
endif()
try_compile(FLEUR_USE_XML ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_XML.f90 try_compile(FLEUR_USE_XML ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_XML.f90
LINK_LIBRARIES ${TEST_LIBRARIES} LINK_LIBRARIES ${TEST_LIBRARIES}
) )
if (FLEUR_USE_XML) if (FLEUR_USE_XML)
set(FLEUR_LIBRARIES ${LIBXML2_LIBRARIES} ${FLEUR_LIBRARIES}) set(FLEUR_LIBRARIES ${TEST_LIBRARIES} )
set(FLEUR_MPI_LIBRARIES ${LIBXML2_LIBRARIES} ${FLEUR_MPI_LIBRARIES}) set(FLEUR_MPI_LIBRARIES ${LIBXML2_LIBRARIES} ${FLEUR_MPI_LIBRARIES})
endif() endif()
endif() endif()
...@@ -40,7 +41,7 @@ if (FLEUR_USE_XML) ...@@ -40,7 +41,7 @@ if (FLEUR_USE_XML)
find_package(LibXml2) find_package(LibXml2)
set(CMAKE_C_FLAGS "-I${LIBXML2_INCLUDE_DIR}") set(CMAKE_C_FLAGS "-I${LIBXML2_INCLUDE_DIR}")
try_compile(FLEUR_USE_XML ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_XML.c try_compile(FLEUR_USE_XML ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/test_XML.c
LINK_LIBRARIES ${LIBXML2_LIBRARIES}) )
endif() endif()
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