> andreas@warnemuende /tmp/$/foo % cat main.cpp
> int main()
> {
> return 0;
> }
>
> andreas@warnemuende /tmp/$/foo % cat CMakeLists.txt
> add_executable(foo main.cpp)
>
> Can you try that on your side to see wether it works?
The error still exits.
/tmp/$/foo_build$ cmake ../foo
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 4.2.1
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/$/foo_build
/tmp/$/foo_build$ make
Scanning dependencies of target foo
make[2]: *** No rule to make target `/tmp/foo/main.cpp', needed by
`CMakeFiles/foo.dir/main.cpp.o'. Stop.
make[1]: *** [CMakeFiles/foo.dir/all] Error 2
make: *** [all] Error 2
/tmp/$/foo_build$ cat.sh ../foo/
CMakeLists.txt main.cpp
/tmp/$/foo_build$ cat.sh ../foo/*
==> ../foo/CMakeLists.txt <==
add_executable(foo main.cpp)
==> ../foo/main.cpp <==
int main()
{
return 0;
}
--
Regards,
Peng
--
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