[CMake] find_path does't accept cmake variables for PATHS
Andreas Pakulat
apaku at gmx.de
Sat Aug 2 15:55:35 EDT 2008
On 02.08.08 21:41:23, Andreas Pakulat wrote:
> Hi,
>
> it seems as if find_path doesn't work when providing multiple paths for
> the PATHS argument via a CMake variable. That is the following code
> doesn't work:
>
> set( VAR /home/andreas/boost_1_35_1/include C:/boost/include C:/Program Files/boost/boost_ /sw/local/include )
> message("VAR: ${VAR}")
> find_path(FOO
> NAMES boost/config.hpp
> PATHS ${VAR}
> PATH_SUFFIXES boost-1_35
> NO_DEFAULT_PATH
> )
> message("FOO: ${FOO}")
>
> I get:
> VAR: /home/andreas/boost_1_35_1/include;C:/boost/include;C:/Program;Files/boost/boost_;/sw/local/include
> FOO: FOO-NOTFOUND
>
> as output. When putting the paths as they are set for the variable
> directly as arguments for PATHS it works fine.
>
> Is this to be expected? The documentation doesn't exactly say anything
> about this, but I find it surprising that I can't pass a variable to
> find_path that contains paths to be checked in.
>
> I've verified this with CMake 2.6.0 and 2.4.5
Nevermind, I should try re-reading the code I write before posting.
The problem was in my sample cmake file as the path to actual boost
location was wrong (boost_1_35_0 is correct).
Andreas
--
Good night to spend with family, but avoid arguments with your mate's
new lover.
More information about the CMake
mailing list