• Sebastien Barre's avatar
    ENH: Provide a way to skip auto-including the BuildSettings.cmake file when... · 6aed534b
    Sebastien Barre authored
    ENH: Provide a way to skip auto-including the BuildSettings.cmake file when importing the whole toolkit from an external project. On Win32, this BuildSettings file would prevent you from building your own project against the toolkit using either a different generator *and*/*or* a compiler that was installed in a non-standard location. This is decision that was made a long time ago to prevent users from shooting themselves in the foot (at the time of Visual Studio 7 taking over Visual Studio 6), but the implementation will make many people's life impossible otherwise. For reference: the BuildSettings.cmake file that is installed holds the flags that were used to build the toolkit, as well as the full paths to a few coresponding compiler tools; if they don't match your own compiler tools by the time you import the toolkit, CMake will give up. There is however no technical reason that you can't use different generators if you are using the exact same compiler version, and obviously the compiler location should not matter either. There were too many combinations possible back then and safeguards were implemented in CMake to check for both the generator and a few compiler tools, then prevent matches doomed to fail by aborting the configuring process. This is too strict, and a decision that can be left to the user ultimately. This is a problem that CMake 2.6 can now take care of anyway, and the corresponding patch will be released over the summer. In the meantime, for the branch and CMake 2.4 users, provide a simple workaround by skipping the BuildSettings.cmake file if SKIP_BUILD_SETTINGS_FILE is set.
UseVTK.cmake.in 1.28 KB