[CMake] String option recognized as boolean
Nils Gladitz
nilsgladitz at gmail.com
Fri May 30 03:11:19 EDT 2014
On 05/30/2014 08:27 AM, Андрей Парамонов wrote:
> Is it a problem in cmake or in HDF5 sources? If the latter, how could it
> be fixed?
> I'm a first-time cmake user, so please forgive my ignorance ;-)
>
> Best wishes,
> Andrey Paramonov
I haven't tried configuring the project but looking at the sources ...
CMakeFilters.cmake (included by CMakeLists.txt) defines it as a boolean
option:
option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building
(NO SVN TGZ)" "NO")
option() is always boolean. To create cache variables with a different
type use set(); this seems to be done by your project's
config/cmake/cacheinit.cmake (which I assume isn't directly included):
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External
Library Building (NO SVN TGZ)" FORCE)
SET_PROPERTY(CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO
SVN TGZ)
If you were to replace the existing option() with that snippet remove
the "FORCE" keyword first.
Nils
More information about the CMake
mailing list