willowgarage/catkin — Issue #101: gtest warning in a stack installed through rosinstall
Author: vrabaud
Created: 2012-03-05 20:04:14+00:00
State: open

-- RT_LIBRARY: /usr/lib/x86_64-linux-gnu/librt.so
CMake Warning (dev) at /opt/ros/fuerte/share/catkin/cmake/tools/gtest.cmake:33 (set):
Cannot set "GTEST_INCLUDE_DIRS": current scope has no parent.
Call Stack (most recent call first):
/opt/ros/fuerte/share/catkin/cmake/all.cmake:53 (include)
/opt/ros/fuerte/share/catkin/cmake/catkin-config.cmake:6 (include)
CMakeLists.txt:25 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at /opt/ros/fuerte/share/catkin/cmake/tools/gtest.cmake:34 (set):
Cannot set "GTEST_LIBRARIES": current scope has no parent.
Call Stack (most recent call first):
/opt/ros/fuerte/share/catkin/cmake/all.cmake:53 (include)
/opt/ros/fuerte/share/catkin/cmake/catkin-config.cmake:6 (include)
CMakeLists.txt:25 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at /opt/ros/fuerte/share/catkin/cmake/tools/gtest.cmake:35 (set):
Cannot set "GTEST_MAIN_LIBRARIES": current scope has no parent.
Call Stack (most recent call first):
/opt/ros/fuerte/share/catkin/cmake/all.cmake:53 (include)
/opt/ros/fuerte/share/catkin/cmake/catkin-config.cmake:6 (include)
CMakeLists.txt:25 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at /opt/ros/fuerte/share/catkin/cmake/tools/gtest.cmake:36 (set):
Cannot set "GTEST_BOTH_LIBRARIES": current scope has no parent.
Call Stack (most recent call first):
/opt/ros/fuerte/share/catkin/cmake/all.cmake:53 (include)
/opt/ros/fuerte/share/catkin/cmake/catkin-config.cmake:6 (include)
CMakeLists.txt:25 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at /opt/ros/fuerte/share/catkin/cmake/tools/gtest.cmake:37 (set):
Cannot set "GTEST_FOUND": current scope has no parent.
Call Stack (most recent call first):
/opt/ros/fuerte/share/catkin/cmake/all.cmake:53 (include)
/opt/ros/fuerte/share/catkin/cmake/catkin-config.cmake:6 (include)
CMakeLists.txt:25 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

And my mine CMake installed through rosinstall looks like this:

#
# TOPLEVEL cmakelists
#
cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0003 NEW)
cmake_policy(SET CMP0011 NEW)

set(CMAKE_CXX_FLAGS_INIT "-Wall")
project('toto')
enable_testing()

include(${CMAKE_SOURCE_DIR}/workspace-config.cmake OPTIONAL)

list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/cmake)

file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/catkin)
message(STATUS "+++ catkin")
set(CATKIN_BUILD_PROJECTS "ALL" CACHE STRING
"List of projects to build, or ALL for all. Use to completely exclude certain projects from cmake traversal.")
add_subdirectory(catkin)
else()
find_package(catkin)
endif()

catkin_workspace()