diff options
Diffstat (limited to 'qpid/cpp/examples')
| -rw-r--r-- | qpid/cpp/examples/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | qpid/cpp/examples/messaging/extra_dist/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | qpid/cpp/examples/winsdk-cmake/CMakeLists.txt | 189 |
3 files changed, 96 insertions, 100 deletions
diff --git a/qpid/cpp/examples/CMakeLists.txt b/qpid/cpp/examples/CMakeLists.txt index 7b0e61e3df..7bcc8d7261 100644 --- a/qpid/cpp/examples/CMakeLists.txt +++ b/qpid/cpp/examples/CMakeLists.txt @@ -17,10 +17,7 @@ # under the License. # project(qpidc_examples) -cmake_minimum_required(VERSION 2.4.0 FATAL_ERROR) -if(COMMAND cmake_policy) - cmake_policy(SET CMP0003 NEW) -endif(COMMAND cmake_policy) +cmake_minimum_required(VERSION 2.8.7 FATAL_ERROR) include_directories(${CMAKE_BINARY_DIR}/include) include_directories(${CMAKE_SOURCE_DIR}/include) diff --git a/qpid/cpp/examples/messaging/extra_dist/CMakeLists.txt b/qpid/cpp/examples/messaging/extra_dist/CMakeLists.txt index be44adaedb..519338ea80 100644 --- a/qpid/cpp/examples/messaging/extra_dist/CMakeLists.txt +++ b/qpid/cpp/examples/messaging/extra_dist/CMakeLists.txt @@ -17,7 +17,7 @@ # under the License. # -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 2.8.7) project (Examples) diff --git a/qpid/cpp/examples/winsdk-cmake/CMakeLists.txt b/qpid/cpp/examples/winsdk-cmake/CMakeLists.txt index 6f089625ca..a59bdca954 100644 --- a/qpid/cpp/examples/winsdk-cmake/CMakeLists.txt +++ b/qpid/cpp/examples/winsdk-cmake/CMakeLists.txt @@ -1,95 +1,94 @@ -#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# Description
-# For WinSDK:
-# Top-level CMake source to build version-independent C++
-# example solution and project files for Visual Studio.
-#
-# Usage:
-# Target: Visual Studio 2008, 32-bit
-# cd <WinSDK>\examples\examples-cmake
-# cmake -G "Visual Studio 9 2008" .
-#
-# Target: Visual Studio 2008, 64-bit
-# cd <WinSDK>\examples\examples-cmake
-# cmake -G "Visual Studio 9 2008 Win64" .
-#
-# Target: Visual Studio 2010, 32-bit
-# cd <WinSDK>\examples\examples-cmake
-# cmake -G "Visual Studio 10" .
-#
-# Target: Visual Studio 2010, 64-bit
-# cd <WinSDK>\examples\examples-cmake
-# cmake -G "Visual Studio 10 Win64" .
-#
-# Then execute the examples.sln created by cmake to build
-# the examples in Debug or Release configurations.
-#
-
-project(examples)
-
-set (CMAKE_VERBOSE_MAKEFILE ON)
-
-cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
-cmake_policy (SET CMP0015 NEW)
-
-set (CMAKE_SUPPRESS_REGENERATION TRUE)
-
-add_definitions(
- /D "_CRT_NONSTDC_NO_WARNINGS"
- /D "NOMINMAX"
- /D "WIN32_LEAN_AND_MEAN"
-)
-
-set (CMAKE_DEBUG_POSTFIX "d")
-
-include_directories ( "../../include" )
-link_directories ( "../../lib" )
-
-macro(add_example_properties example)
- set_target_properties(${example} PROPERTIES OUTPUT_NAME "${example}" )
- set_target_properties(${example} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../bin/${CMAKE_BUILD_TYPE})
-
- target_link_libraries(${example} optimized qpidmessaging debug qpidmessagingd)
- target_link_libraries(${example} optimized qpidcommon debug qpidcommond )
- target_link_libraries(${example} optimized qpidtypes debug qpidtypesd )
-endmacro(add_example_properties)
-
-macro(add_example srcdirectory example)
- add_executable(${example} ../${srcdirectory}/${example}.cpp)
- add_example_properties(${example})
-endmacro(add_example)
-
-macro(add_example_with_parser srcdirectory example)
- add_executable(${example} ../${srcdirectory}/${example}.cpp ../messaging/OptionParser.cpp)
- add_example_properties(${example})
-endmacro(add_example_with_parser)
-
-add_example_with_parser(messaging drain)
-add_example_with_parser(messaging spout)
-
-add_example(messaging map_receiver)
-add_example(messaging map_sender)
-add_example(messaging client)
-add_example(messaging server)
-add_example(messaging server_reconnect)
-add_example(messaging hello_world)
-add_example(messaging hello_xml)
+# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# +# Description +# For WinSDK: +# Top-level CMake source to build version-independent C++ +# example solution and project files for Visual Studio. +# +# Usage: +# Target: Visual Studio 2008, 32-bit +# cd <WinSDK>\examples\examples-cmake +# cmake -G "Visual Studio 9 2008" . +# +# Target: Visual Studio 2008, 64-bit +# cd <WinSDK>\examples\examples-cmake +# cmake -G "Visual Studio 9 2008 Win64" . +# +# Target: Visual Studio 2010, 32-bit +# cd <WinSDK>\examples\examples-cmake +# cmake -G "Visual Studio 10" . +# +# Target: Visual Studio 2010, 64-bit +# cd <WinSDK>\examples\examples-cmake +# cmake -G "Visual Studio 10 Win64" . +# +# Then execute the examples.sln created by cmake to build +# the examples in Debug or Release configurations. +# + +project(examples) + +set (CMAKE_VERBOSE_MAKEFILE ON) + +cmake_minimum_required(VERSION 2.8.7 FATAL_ERROR) + +set (CMAKE_SUPPRESS_REGENERATION TRUE) + +add_definitions( + /D "_CRT_NONSTDC_NO_WARNINGS" + /D "NOMINMAX" + /D "WIN32_LEAN_AND_MEAN" +) + +set (CMAKE_DEBUG_POSTFIX "d") + +include_directories ( "../../include" ) +link_directories ( "../../lib" ) + +macro(add_example_properties example) + set_target_properties(${example} PROPERTIES OUTPUT_NAME "${example}" ) + set_target_properties(${example} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../bin/${CMAKE_BUILD_TYPE}) + + target_link_libraries(${example} optimized qpidmessaging debug qpidmessagingd) + target_link_libraries(${example} optimized qpidcommon debug qpidcommond ) + target_link_libraries(${example} optimized qpidtypes debug qpidtypesd ) +endmacro(add_example_properties) + +macro(add_example srcdirectory example) + add_executable(${example} ../${srcdirectory}/${example}.cpp) + add_example_properties(${example}) +endmacro(add_example) + +macro(add_example_with_parser srcdirectory example) + add_executable(${example} ../${srcdirectory}/${example}.cpp ../messaging/OptionParser.cpp) + add_example_properties(${example}) +endmacro(add_example_with_parser) + +add_example_with_parser(messaging drain) +add_example_with_parser(messaging spout) + +add_example(messaging map_receiver) +add_example(messaging map_sender) +add_example(messaging client) +add_example(messaging server) +add_example(messaging server_reconnect) +add_example(messaging hello_world) +add_example(messaging hello_xml) |
