summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-01-07 16:48:39 (GMT)
committerBrad King <brad.king@kitware.com>2014-02-14 20:48:43 (GMT)
commit0c62ed33c937ccb101fcb6f30306626da1c312e5 (patch)
tree01368e0aa847d444a1be466105e3efce3e80b01f /CMakeLists.txt
parented9c866490f5799ea0a4cf6fb88b1e705d594b61 (diff)
downloadCastXML-0c62ed33c937ccb101fcb6f30306626da1c312e5.zip
CastXML-0c62ed33c937ccb101fcb6f30306626da1c312e5.tar.gz
CastXML-0c62ed33c937ccb101fcb6f30306626da1c312e5.tar.bz2
Detect settings from GNU-like compilers
Implement '--castxml-cc-gnu' option to detect preprocessor settings and the target triplet from GNU-like compilers. Run the compiler command with "-E -dM -v empty.cpp" and capture stdout and stderr. Treat the stdout as the preprocessor predefines block and parse it to extract the target architecture. Parse the stderr to extract the header file search path. Install the now-populated share/castxml resource directory to the CastXML_INSTALL_DATA_DIR.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1848744..7d946a7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,3 +48,5 @@ include_directories(${LLVM_INCLUDE_DIRS})
link_directories(${LLVM_LIBRARY_DIRS})
add_subdirectory(src)
+
+install(DIRECTORY share/castxml/ DESTINATION "${CastXML_INSTALL_DATA_DIR}")