updated cmake min version to 2.8.3, use cmake_parse_arguments instead of custom macro

This commit is contained in:
Dirk Thomas 2012-10-03 07:31:34 +00:00
parent a755d391e6
commit d90967f148
13 changed files with 21 additions and 15 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8.3)
project(mk) project(mk)
find_package(catkin REQUIRED) find_package(catkin REQUIRED)
catkin_package() catkin_package()

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8.3)
project(rosbuild) project(rosbuild)
find_package(catkin REQUIRED) find_package(catkin REQUIRED)
catkin_package() catkin_package()

View File

@ -114,13 +114,13 @@ endmacro(_rosbuild_check_rostest_xml_result test_name)
macro(_rosbuild_add_gtest exe) macro(_rosbuild_add_gtest exe)
# Look for optional TIMEOUT argument, #2645 # Look for optional TIMEOUT argument, #2645
parse_arguments(_gtest "TIMEOUT" "" ${ARGN}) cmake_parse_arguments(_gtest "" "TIMEOUT" "" ${ARGN})
if(NOT _gtest_TIMEOUT) if(NOT _gtest_TIMEOUT)
set(_gtest_TIMEOUT 60.0) set(_gtest_TIMEOUT 60.0)
endif(NOT _gtest_TIMEOUT) endif(NOT _gtest_TIMEOUT)
# Create the program, with basic + gtest build flags # Create the program, with basic + gtest build flags
rosbuild_add_executable(${exe} EXCLUDE_FROM_ALL ${_gtest_DEFAULT_ARGS}) rosbuild_add_executable(${exe} EXCLUDE_FROM_ALL ${_gtest_UNPARSED_ARGUMENTS})
rosbuild_add_gtest_build_flags(${exe}) rosbuild_add_gtest_build_flags(${exe})
# Create a legal target name, in case the target name has slashes in it # Create a legal target name, in case the target name has slashes in it
@ -212,7 +212,7 @@ endmacro(_rosbuild_add_rostest)
macro(_rosbuild_add_pyunit file) macro(_rosbuild_add_pyunit file)
# Look for optional TIMEOUT argument, #2645 # Look for optional TIMEOUT argument, #2645
parse_arguments(_pyunit "TIMEOUT" "" ${ARGN}) cmake_parse_arguments(_pyunit "" "TIMEOUT" "" ${ARGN})
if(NOT _pyunit_TIMEOUT) if(NOT _pyunit_TIMEOUT)
set(_pyunit_TIMEOUT 60.0) set(_pyunit_TIMEOUT 60.0)
endif(NOT _pyunit_TIMEOUT) endif(NOT _pyunit_TIMEOUT)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8.3)
project(roslang) project(roslang)
find_package(catkin REQUIRED) find_package(catkin REQUIRED)
catkin_package() catkin_package()

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8.3)
project(roslib) project(roslib)
find_package(catkin REQUIRED COMPONENTS rospack) find_package(catkin REQUIRED COMPONENTS rospack)
catkin_package( catkin_package(
@ -48,3 +48,7 @@ catkin_add_gtest(${PROJECT_NAME}-test_package test/package.cpp)
if(TARGET ${PROJECT_NAME}-test_package) if(TARGET ${PROJECT_NAME}-test_package)
target_link_libraries(${PROJECT_NAME}-test_package roslib ${catkin_LIBRARIES}) target_link_libraries(${PROJECT_NAME}-test_package roslib ${catkin_LIBRARIES})
endif() endif()
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/export.cmake "")
export(TARGETS roslib FILE ${CMAKE_CURRENT_BINARY_DIR}/export.cmake APPEND)
#include(${CMAKE_CURRENT_BINARY_DIR}/export.cmake)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8.3)
project(ros) project(ros)
find_package(catkin REQUIRED) find_package(catkin REQUIRED)
catkin_package() catkin_package()

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8.3)
project(rosbash) project(rosbash)
find_package(catkin) find_package(catkin)
catkin_package() catkin_package()

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8.3)
project(rosboost_cfg) project(rosboost_cfg)
find_package(catkin REQUIRED) find_package(catkin REQUIRED)
catkin_package() catkin_package()

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8.3)
project(rosclean) project(rosclean)
find_package(catkin REQUIRED) find_package(catkin REQUIRED)
catkin_package() catkin_package()

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8.3)
project(roscreate) project(roscreate)
find_package(catkin REQUIRED) find_package(catkin REQUIRED)
catkin_package() catkin_package()

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8.3)
project(rosmake) project(rosmake)
find_package(catkin REQUIRED) find_package(catkin REQUIRED)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8.3)
project(rosunit) project(rosunit)
find_package(catkin REQUIRED) find_package(catkin REQUIRED)
catkin_package(CFG_EXTRAS ${PROJECT_NAME}-extras.cmake) catkin_package(CFG_EXTRAS ${PROJECT_NAME}-extras.cmake)

View File

@ -1,3 +1,5 @@
include(CMakeParseArguments)
macro(rosunit_initialize_tests) macro(rosunit_initialize_tests)
if (@BUILDSPACE@) if (@BUILDSPACE@)
find_program_required(ROSUNIT_EXE rosunit find_program_required(ROSUNIT_EXE rosunit
@ -17,7 +19,7 @@ function(add_pyunit file)
message(WARNING "add_pyunit() is deprecated. For Python tests, use add_nostests() instead.") message(WARNING "add_pyunit() is deprecated. For Python tests, use add_nostests() instead.")
# Look for optional TIMEOUT argument, #2645 # Look for optional TIMEOUT argument, #2645
parse_arguments(_pyunit "TIMEOUT;WORKING_DIRECTORY" "" ${ARGN}) cmake_parse_arguments(_pyunit "" "TIMEOUT;WORKING_DIRECTORY" "" ${ARGN})
if(NOT _pyunit_TIMEOUT) if(NOT _pyunit_TIMEOUT)
set(_pyunit_TIMEOUT 60.0) set(_pyunit_TIMEOUT 60.0)
endif() endif()