summaryrefslogtreecommitdiffstats
path: root/test/ctest/scripts/run_header_compiles.cmake
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-05-12 13:30:14 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-05-12 13:30:14 (GMT)
commit59b51d5e70bd51a59d03c46e44148f53a0bf99a6 (patch)
treeb82a80a45eaf0f7db7a0165d636f6e7c281bdf25 /test/ctest/scripts/run_header_compiles.cmake
parent46b41e28989ea66eeebe0b8a35a52fb2d22abf3f (diff)
downloaduscxml-59b51d5e70bd51a59d03c46e44148f53a0bf99a6.zip
uscxml-59b51d5e70bd51a59d03c46e44148f53a0bf99a6.tar.gz
uscxml-59b51d5e70bd51a59d03c46e44148f53a0bf99a6.tar.bz2
Corrected gitignore and travis config
Diffstat (limited to 'test/ctest/scripts/run_header_compiles.cmake')
-rw-r--r--test/ctest/scripts/run_header_compiles.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/ctest/scripts/run_header_compiles.cmake b/test/ctest/scripts/run_header_compiles.cmake
new file mode 100644
index 0000000..e60ef0e
--- /dev/null
+++ b/test/ctest/scripts/run_header_compiles.cmake
@@ -0,0 +1,21 @@
+# minimize SCXML document and run
+get_filename_component(TEST_FILE_NAME ${TESTFILE} NAME)
+
+set(COMPILE_CMD_BIN
+"-c"
+"-I${PROJECT_SOURCE_DIR}/contrib/src"
+"-I${PROJECT_BINARY_DIR}/deps/xerces-c/include"
+"-I${PROJECT_BINARY_DIR}/deps/libevent/include"
+"-I${PROJECT_BINARY_DIR}/deps/uriparser/include"
+"-I${PROJECT_SOURCE_DIR}/contrib/src/evws"
+"-I${CMAKE_BINARY_DIR}"
+"-I${PROJECT_BINARY_DIR}"
+"-I${PROJECT_SOURCE_DIR}/src"
+"${TESTFILE}")
+
+execute_process(COMMAND ${CXX_BIN} ${COMPILE_CMD_BIN} RESULT_VARIABLE CMD_RESULT)
+if(CMD_RESULT)
+ message(FATAL_ERROR "Error running ${CXX_BIN}")
+endif()
+
+