[Insight-users] Hello Word problem on linux
Luis Ibanez
luis.ibanez@kitware.com
Thu, 21 Nov 2002 14:43:05 -0500
Hi Ghassan,
When you configure an application with CMake
the concepts of
- Source directory
- Binary directory
are quite important.
CMake associates your Binary directory with
the Source directory in a permanent way.
You can use the same Source directory to
build several different Binary directories.
This allow you, for example, to have different
builds with different options enabled.
Once a Binary directory has been configured
you cannot change the Source directory from
which the configuration was made.
---
It looks like you are doing this on Unix,
is this right ?
The most likely error in your case, is that
"cmake" expects the source directory to be
passed as its first parameter. If the argument
is missing it assumes the current directory.
It is a common mistake to move into the
binary directory and just type:
> cmake
instead of:
> cmake mysourcedirectory
that makes CMake assume: "cmake . ".
The supplied directory (here ".") is compared
by CMake with the source directory you provided
when this binary directory was configured by
the first time. If the two directories don't
match, you got exactly the error message
that you posted.
Note that CMake expects just the "directory"
where the CMakeLists.txt file is. The actual
file is not needed explicitly on the path.
An easy way to avoid this is invoking "cmake"
through the makefile, as:
make rebuild_cache
Please let us know if you find further problem.
Thanks,
Luis
========================================
Ghassan Hamarneh wrote:
> Hi,
>
> I am trying to run the simple HELLO WORLD exampl, but having problems:
> I put these 2 file in a new folder and run ccmake .
>
> CMakeList.txt
> SampleProject.cxx
>
> I get this error:
>
> CMake Error: Error: source : /projects/mice/ghassan/ITK/CMakeLists.txt
> Does not match source used to generate cache:
> /projects/mice/ghassan/ITK/CMakeLists.txt
> Re-run cmake with a different source directory.
>
> what's the problem?
>
> Thanks you,
>
> /Ghassan
>
>
>
> ______________________________________________________________________
> Post your free ad now! http://personals.yahoo.ca
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>
>