On 04/10/2014 07:01 AM, Claus Klein wrote:
Hi all,

I have problems with the following cmake build script:

find_program(CCP_EXECUTABLE cpp REQUIRED HINTS /opt/local/bin)
find_program(ASN1C_EXECUTABLE asn1c REQUIRED HINTS /opt/local/bin)

find_program() does not understand "REQUIRED" (sadly it does not complain either):
        www.cmake.org/cmake/help/git-master/command/find_program.html


     ### adding a custom command to produce an output.
     add_custom_target(OUTPUT ${ASN1_SOURCES}
         COMMAND ${ASN1C_EXECUTABLE} -S
${CMAKE_CURRENT_SOURCE_DIR}/../../skeletons
             -pdu=all ${ASN1C_OUTPUT_DIR}/_sample.asn1
         COMMAND astyle *.c *.h
         DEPENDS ${ASN1C_OUTPUT_DIR}/_sample.asn1
         WORKING_DIRECTORY ${ASN1C_OUTPUT_DIR}
         VERBATIM)

add_custom_target() does not have an OUTPUT option, the first parameter is the target name:
        www.cmake.org/cmake/help/git-master/command/add_custom_target.html

add_custom_command() does:
        www.cmake.org/cmake/help/git-master/command/add_custom_command.html

You may also want to try the user's mailing list rather than the developer's mailing list since your issues aren't related to the development of CMake itself.

Nils
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to