Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
fleur
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Anoop Chandran
fleur
Commits
f9149cc1
Commit
f9149cc1
authored
May 22, 2017
by
Daniel Wortmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added XML tests for the C-part to make sure not only library but also include files are found
parent
c2c996d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
cmake/tests/test_XML.c
cmake/tests/test_XML.c
+11
-0
cmake/tests/test_XML.cmake
cmake/tests/test_XML.cmake
+16
-2
No files found.
cmake/tests/test_XML.c
0 → 100644
View file @
f9149cc1
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xmlschemas.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
int
main
()
{
return
0
;
}
cmake/tests/test_XML.cmake
View file @
f9149cc1
...
...
@@ -17,9 +17,23 @@ try_compile(FLEUR_USE_XML ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/te
endif
()
endif
()
message
(
"XML Library found:
${
FLEUR_USE_XML
}
"
)
message
(
"XML Library found for linking:
${
FLEUR_USE_XML
}
"
)
if
(
FLEUR_USE_XML
)
try_compile
(
FLEUR_USE_XML
${
CMAKE_BINARY_DIR
}
${
CMAKE_SOURCE_DIR
}
/cmake/tests/test_XML.c
LINK_LIBRARIES
${
FLEUR_LIBRARIES
}
)
if
(
NOT FLEUR_USE_XML
)
find_package
(
LibXml2
)
set
(
CMAKE_C_FLAGS
"-I
${
LIBXML2_INCLUDE_DIR
}
"
)
try_compile
(
FLEUR_USE_XML
${
CMAKE_BINARY_DIR
}
${
CMAKE_SOURCE_DIR
}
/cmake/tests/test_XML.c
LINK_LIBRARIES
${
FLEUR_LIBRARIES
}
)
endif
()
endif
()
message
(
"XML Library found for C:
${
FLEUR_USE_XML
}
"
)
if
(
FLEUR_USE_XML
)
set
(
FLEUR_DEFINITIONS
${
FLEUR_DEFINITIONS
}
"CPP_XML"
)
set
(
FLEUR_MPI_DEFINITIONS
${
FLEUR_MPI_DEFINITIONS
}
"CPP_XML"
)
endif
()
\ No newline at end of file
endif
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment