Skip to content

Commit

Permalink
[cmake/tests] Fix find_package_handle_standard_args incorrect argument
Browse files Browse the repository at this point in the history
* Fix regression introduced in 32d6cef
* find_package_handle_standard_args is meant to be invoked with the
same package name as a preceding call to find_package. Without it,
it won't be able to tell, if the package is required or optional.
  • Loading branch information
SergioRAgostinho committed May 24, 2019
1 parent 0a5baca commit 5323a4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -421,12 +421,6 @@ configure_file("${pcl_config_h_in}" "${pcl_config_h}")
PCL_ADD_INCLUDES(common "" "${pcl_config_h}")
include_directories("${CMAKE_CURRENT_BINARY_DIR}/include")

### ---[ Set up for tests
enable_testing()

### ---[ Set up for examples
#include("${PCL_SOURCE_DIR}/cmake/pcl_examples.cmake")

### ---[ Add the libraries subdirectories
include("${PCL_SOURCE_DIR}/cmake/pcl_targets.cmake")

Expand Down
3 changes: 2 additions & 1 deletion cmake/Modules/FindGTestSource.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIR})
set(CMAKE_FIND_FRAMEWORK)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Gtest DEFAULT_MSG GTEST_INCLUDE_DIR GTEST_SRC_DIR)
find_package_handle_standard_args(GTestSource DEFAULT_MSG GTEST_INCLUDE_DIR GTEST_SRC_DIR)
set(GTEST_FOUND ${GTestSource_FOUND})

mark_as_advanced(GTEST_INCLUDE_DIR GTEST_SRC_DIR)

Expand Down

0 comments on commit 5323a4a

Please sign in to comment.