diff options
author | jmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-03-18 10:27:17 +0000 |
---|---|---|
committer | jmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-03-18 10:27:17 +0000 |
commit | d1b2a85437eea4deaa23bf6944e69c67208d76eb (patch) | |
tree | 447b5cb2f49d91c4f87cd170ac0fe6f6b032117a /cmake | |
parent | 66eb2e219eaf33e61aded4b03b29ccce22ae499a (diff) |
cmake changes:
- Add checking for linker flags
- Install plugins with the name including the Wireshark version.
This will make it easier to find matching plugin versions if
files get just copied over.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32231 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/CheckCLinkerFlag.cmake | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/cmake/modules/CheckCLinkerFlag.cmake b/cmake/modules/CheckCLinkerFlag.cmake new file mode 100644 index 0000000000..4181da05f6 --- /dev/null +++ b/cmake/modules/CheckCLinkerFlag.cmake @@ -0,0 +1,22 @@ +# - Check whether the C linker supports a given flag. +# CHECK_C_LINKER_FLAG(FLAG VARIABLE) +# +# FLAG - the compiler flag +# VARIABLE - variable to store the result +# +# This actually calls the check_c_source_compiles macro. +# See help for CheckCSourceCompiles for a listing of variables +# that can modify the build. + +# Copyright (c) 2010, Joerg Mayer (see AUTHORS file) +# +# Redistribution and use is allowed according to the terms of the BSD license. + +INCLUDE(CheckCSourceCompiles) + +MACRO (CHECK_C_LINKER_FLAG _FLAG _RESULT) + SET(CMAKE_REQUIRED_FLAGS "${_FLAG}") + message(status "check linker flag - test linker flags: ${CMAKE_REQUIRED_FLAGS}") + CHECK_C_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT}) +ENDMACRO (CHECK_C_LINKER_FLAG) + |