summaryrefslogtreecommitdiffstats
path: root/Modules/CheckCXXSourceRuns.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Handle targets in the LINK_LIBRARIES of try_compile.Stephen Kelly2013-02-221-5/+2
| | | | | | | | | | Imported targets are re-exported so that they can be used by the try_compile generated code with target_link_libraries. This makes the use of the cmake_expand_imported_targets macro obsolete. The macro is not able to expand the generator expressions which may appear in the IMPORTED_LINK_INTERFACE_LIBRARIES content. Instead it just sees them as 'not a target'.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-11/+11
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Convert CMake-language commands to lower caseKitware Robot2012-08-131-35/+35
| | | | | | | | | | | | | | | | | Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code: cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Check*.cmake: Expand imported targets in CMAKE_REQUIRED_LIBRARIESAlex Neundorf2012-02-211-1/+6
| | | | | | | | | | | Add the function cmake_expand_imported_targets() to expand imported targets in a list of libraries into their on-disk file names for a particular configuration. Adapt the implementation from KDE's HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES which has been in use for over 2 years. Call the function from all the Check*.cmake macros to handle imported targets named in CMAKE_REQUIRED_LIBRARIES. Alex
* -remove trailing whitespaceAlex Neundorf2012-02-211-5/+5
| | | | Alex
* Modules: Fix spelling 'To distributed' -> 'To distribute'Todd Gamblin2010-08-091-1/+1
|
* Convert CMake non-find modules to BSD LicenseBrad King2009-09-281-0/+13
| | | | | | | This adds copyright/license notification blocks CMake's non-find modules. Most of the modules had no notices at all. Some had notices referring to the BSD license already. This commit normalizes existing notices and adds missing notices.
* Cleanup generic compiler check macro documentationBrad King2009-09-171-6/+5
| | | | | | | | | | | | | | | This commit improves formatting and style of the documentation for the general-purpose compiler check macros: CHECK_C_COMPILER_FLAG CHECK_C_SOURCE_COMPILES CHECK_C_SOURCE_RUNS CHECK_CXX_COMPILER_FLAG CHECK_CXX_SOURCE_COMPILES CHECK_CXX_SOURCE_RUNS This sytle is more consistent with CMake command documentation. It also looks nicer in the generated documentation text files.
* STYLE: fix documentation: the second short description discarded the firstAlexander Neundorf2009-03-111-2/+2
| | | | | | | one, but the first one was the correct one (i.e. the one which mentioned that CheckC[XX]SourceRuns.cmake also tries to run the executable) Alex
* ENH: use the same CMAKE_SKIP_RPATH setting in CHECK_C/CXX_SOURCE_RUNS as inAlexander Neundorf2007-08-281-0/+1
| | | | | | | | | | the main project. I think it doesn't make sense if a project disables RPATH, uses CHECK_C_SOURCE_RUNS() to see if something is able to run, and this succeeds because it has been built with RPATH, but an executable built within the project won't be able to run since it has been built without RPATH. Alex
* STYLE: don't use FIND_INCLUDE_FILE() but only FIND_INCLUDE_FILES() inAlexander Neundorf2007-07-311-7/+13
| | | | | | | | | | | | FindThreads.h BUG: improve CheckC(XX)SourceRuns.cmake so that it works with cross compiling, the return value has to go in the cache but shouldn't overwrite the actual return value, and it should go only in the cache if we have a result from try_run() otherwise we won't get here again if we have a result later on Alex
* BUG: the SET( ... CACHE INTERNAL) didn't work as expected, since theAlexander Neundorf2007-07-131-2/+0
| | | | | | | | | variable is already added to the cache inside cmTryRunCommand.cxx, so the value used here was ignored. Additionally the INTERNAL made it internal, which shouldn't be done when cross compiling, since here the user is required to edit this variable manually e.g. using ccmake. Alex
* ENH: improve TRY_RUN() for crosscompiling: instead of just failing, it nowAlexander Neundorf2007-06-011-2/+3
| | | | | | | | | | | | | | | creates two cache variables, one for the RUN_RESULT, one for the RUN_OUTPUT (if required), which can be set or preset by the user. It has now also two new arguments: RUN_OUTPUT_VARIABLE and COMPILE_OUTPUT_VARIABLE (the old OUTPUT_VARIABLE merges both), so if only COMPILE_OUTPUT_VARIABLE is used the run time output of the TRY_RUN is unused and the user doesn't have to care about the output when crosscompiling. This is now used in FindThreads.cmake, CheckC/CXXSourceRuns.cmake and TestBigEndian.cmake, which used the output only for the logfile (compile output is still there). Test/TryCompile/ now also tests the behaviour of OUTPUT_VARIABLE, RUN_OUTPUT_VARIABLE and COMPILE_OUTPUT_VARIABLE. Alex
* ENH: fixs for check compile stuff from Oswald B.Bill Hoffman2006-08-211-6/+7
|
* ENH: add a try run source code macroBill Hoffman2006-08-031-0/+67