Hello friends,
I have a problem when running cmake command, the add_executable ( ) is
giving me an error which I cannot see what is the problem. I have in my main
CMakeLists.txt files the following section:
======================================
include (host/CMakeLists.txt)
foreach (FILE ${FILES})
set (hostFiles ${hostFiles} host/${FILE})
endforeach (FILE)
add_executable (mainprog ${hostFiles})
======================================
After running the cmake command I got the following error:
Adding subdirectory host...
Entering host's CMakeLists
CMake Error at CMakeLists.txt:82 (add_executable):
add_executable called with incorrect number of arguments
My understanding is that add_executable can take from 2 arguments, is this
correct?
As shown above, I have in host/ subdirectory a CMakeLists.txt file with the
following:
set(CMAKE_INCLUDE_CURRENT_DIR ON)
message ("Entering host's CMakeLists")
and that's it.
What could be the problem?
Thanks
Best Regards
Enrique
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake