NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Portable Makefile ideas
In article <20190210204645.b6d0fd7478f526017d69becd%googlemail.com@localhost> you write:
>I've had a quick look at various howtos, and I will look in more detail
>in a few days. However can you elaborate on how CMake handles different
>build environments. For example, does it automatically know different
>compilers and can correctly generate the right set of compiler options
>for building executables and shared libraries, etc? In other words, can
>it be used as a substitute for tools like Libtool?
One of the first things cmake does is determine the platform and compiler
for the system it is building code for. It uses that to configure the
compiler/link flags for shared libs, etc. You would not use libtool with
this.
if you've got cmake 3.x installed from pkgsrc into /usr/pkg, the NetBSD
platform file is here:
/usr/pkg/share/cmake-3.*/Modules/Platform/NetBSD.cmake
that makes NetBSD-specific modifications to the generic platform
config stored here:
/usr/pkg/share/cmake-3.*/Modules/CMakeGenericSystem.cmake
Compiler-specific information is stored in
/usr/pkg/share/cmake-3.*/Modules/Compiler
(e.g. there are GNU*.cmake, Clang*.cmake, etc. files there)
chuck
Home |
Main Index |
Thread Index |
Old Index