Avoir a CMake error

When the list `CMAKE_CXX_COMPILE_FEATURES` is empty, there was a syntax
error.
```
CMake Error at /mnt/testsuite/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake:27 (list):
  list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
  CMakeLists.txt:75 (create_single_source_cgal_program)

```
This commit is contained in:
Laurent Rineau 2016-10-05 10:07:01 +02:00
parent 50d753350e
commit e8dede494e
1 changed files with 3 additions and 1 deletions

View File

@ -24,7 +24,9 @@ function(create_single_source_cgal_program firstfile )
endif()
if(CXX_FEATURES)
set(MISSING_CXX_FEATURES ${CXX_FEATURES})
list(REMOVE_ITEM MISSING_CXX_FEATURES ${CMAKE_CXX_COMPILE_FEATURES})
if(CMAKE_CXX_COMPILE_FEATURES)
list(REMOVE_ITEM MISSING_CXX_FEATURES ${CMAKE_CXX_COMPILE_FEATURES})
endif()
endif()
# Now MISSING_CXX_FEATURES is the set CXX_FEATURES minus CMAKE_CXX_COMPILE_FEATURES
if(MISSING_CXX_FEATURES)