I have the following CMakeLists.txt file:

    project(foo)
    add_executable(foo MACOSX_BUNDLE main.cc)
    add_custom_target(run_foo echo running foo DEPENDS foo)

This is what I get (Mac OS X Leopard, CMake 2.6.0 and 2.7 from CVS):

    % make run_foo
    Scanning dependencies of target foo
    [100%] Building CXX object CMakeFiles/foo.dir/main.o
    Linking CXX executable foo.app/Contents/MacOS/foo
    [100%] Built target foo
    Scanning dependencies of target run_foo
make[3]: *** No rule to make target `foo', needed by `CMakeFiles/ run_foo'. Stop.
    make[2]: *** [CMakeFiles/run_foo.dir/all] Error 2
    make[1]: *** [CMakeFiles/run_foo.dir/rule] Error 2
    make: *** [run_foo] Error 2

Without the MACOSX_BUNDLE setting of the target, or trying to build the same project on Linux, it works.

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to