Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disabling cookbook by default and make cmake fail when dependencies f…
…or meta examples are not met
- Loading branch information
Showing
5 changed files
with
42 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
function(find_python_module module) | ||
string(TOUPPER ${module} module_upper) | ||
if(NOT PY_${module_upper}) | ||
if(ARGC GREATER 1 AND ARGV1 STREQUAL "REQUIRED") | ||
set(${module}_FIND_REQUIRED TRUE) | ||
endif() | ||
# A module's location is usually a directory, but for binary modules | ||
# it's a .so file. | ||
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" | ||
"import re, ${module}; print re.compile('/__init__.py.*').sub('',${module}.__file__)" | ||
RESULT_VARIABLE _${module}_status | ||
OUTPUT_VARIABLE _${module}_location | ||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
if(NOT _${module}_status) | ||
set(PY_${module_upper} ${_${module}_location} CACHE STRING | ||
"Location of Python module ${module}") | ||
endif(NOT _${module}_status) | ||
endif(NOT PY_${module_upper}) | ||
find_package_handle_standard_args(PY_${module} DEFAULT_MSG PY_${module_upper}) | ||
endfunction(find_python_module) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters