On 08/22/2016 01:30 PM, Albrecht Schlosser wrote:
On 22.08.2016 12:54 Nils Gladitz wrote:
On 08/22/2016 12:18 PM, Albrecht Schlosser wrote:
On 22.08.2016 10:33 Nils Gladitz wrote:
The visual studio command line environments should have no effect when
using the visual studio generators.
Are you sure? Or what does "should" mean here? ;-)
Yes. The Visual Studio generators are meant to work outside of the
visual studio command line environments while the command line
generators (makefiles, ninja) are meant to work from within the visual
studio command line environment.
What that means is that the Visual Studio generators must work
without it.
Okay, I posted a simple example CMake file to show what happens in my
case. See new thread:
"Visual Studio generator does not find some header files"
Basically some special (SDK?) header files are not found when
executing CMake w/o the Visual Studio environment.
E.g. CMake find_path() uses the INCLUDE environment variable (which is
provided by the visual studio command line environment) if set.
So yes this can influence CMake itself but not Visual Studio.
Since the paths in the INCLUDE environment variable are not used by
Visual Studio this can result in obvious conflicts.
Since CMake does not (I don't know if it (easily) could) know the
implicit include directories Visual Studio uses it can not use them in
find_*() calls either.
In case of the OpenGL library (which on windows is part of the
windows/platform SDK) cmake e.g. assumes (within the FindOpenGL.cmake
module) that the header is in an implicit include directory and does not
try to locate it.
Assuming this matches your use case I would suggest you do the same.
Nils
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake