aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorJoakim Söderberg <joakim.soderberg@gmail.com>2013-02-27 23:37:35 +0100
committerJoakim Soderberg <joakim.soderberg@gmail.com>2013-03-07 16:12:08 +0100
commit52a807272760920533ee2db81b4ae009bb0a6e5c (patch)
treedcca4678c294726c20914b04dacaf51072ab3d59 /cmake
parent741e6915e223d75aa12169d5fdee4e0f8e457f42 (diff)
downloadjansson-52a807272760920533ee2db81b4ae009bb0a6e5c.zip
jansson-52a807272760920533ee2db81b4ae009bb0a6e5c.tar.gz
jansson-52a807272760920533ee2db81b4ae009bb0a6e5c.tar.bz2
Rename the CMakeModules directory to simply cmake.
This is more consistent with the other directories in the project.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/CheckFunctionKeywords.cmake15
-rw-r--r--cmake/FindSphinx.cmake16
2 files changed, 31 insertions, 0 deletions
diff --git a/cmake/CheckFunctionKeywords.cmake b/cmake/CheckFunctionKeywords.cmake
new file mode 100644
index 0000000..44601fd
--- /dev/null
+++ b/cmake/CheckFunctionKeywords.cmake
@@ -0,0 +1,15 @@
+include(CheckCSourceCompiles)
+
+macro(check_function_keywords _wordlist)
+ set(${_result} "")
+ foreach(flag ${_wordlist})
+ string(REGEX REPLACE "[-+/ ()]" "_" flagname "${flag}")
+ string(TOUPPER "${flagname}" flagname)
+ set(have_flag "HAVE_${flagname}")
+ check_c_source_compiles("${flag} void func(); void func() { } int main() { func(); return 0; }" ${have_flag})
+ if(${have_flag} AND NOT ${_result})
+ set(${_result} "${flag}")
+# break()
+ endif(${have_flag} AND NOT ${_result})
+ endforeach(flag)
+endmacro(check_function_keywords)
diff --git a/cmake/FindSphinx.cmake b/cmake/FindSphinx.cmake
new file mode 100644
index 0000000..76f6e2a
--- /dev/null
+++ b/cmake/FindSphinx.cmake
@@ -0,0 +1,16 @@
+find_program(SPHINX_EXECUTABLE NAMES sphinx-build
+ HINTS
+ $ENV{SPHINX_DIR}
+ PATH_SUFFIXES bin
+ DOC "Sphinx documentation generator"
+)
+
+include(FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args(Sphinx DEFAULT_MSG
+ SPHINX_EXECUTABLE
+)
+
+mark_as_advanced(
+  SPHINX_EXECUTABLE
+)