Version.h Not found
Building with CMake in windows (MSVS 2008) fails because version.h is not in the include path. This has been happening for months now, but as we're approaching a release, we might want to streamline the build process.
4>C:\FAH\gromacs-build-aug12\src\gmxlib\version.c(1): catastrophic error: could not open source file "version.h"
4> #include "version.h"
My (hack!) solution to this has been to copy version.h to the include directory
cp gromacssrc/src/gmxlib/version.h gromacssrc/include
#2 Updated by Teemu Murtola over 9 years ago
This works fine for me with CMake 2.6.2 on Linux, even with the build directory completely outside the source tree. I don't know how CMake decides when to set the -I flag for out-of-tree builds, but it does it correctly for me, but apparently not on Windows.
The proper fix should be to change the first line of src/gmxlib/version.c.cmakein to #include "
PROJECT_SOURCE_DIR/src/gmxlib/version.h" to not rely on -I being set correctly. Could you try whether this fixes your problem? Bug 476 only concerns autoconf, and neither of these bugs affect released versions because the version generation is only used for trees checked out of git.
#4 Updated by Erik Lindahl over 9 years ago
I've never had any problems with version.h under Windows 7 (64-bit), MSVC 2008, and cmake-2.8 - all installed in default locations.
Kyle, could you try with more verbose output during the cmake configuration stage and see what happens? Is there any command (cmake?) that isn't found?