[CMake] General cross platform stating place

Johannes Zarl-Zierl johannes.zarl-zierl at jku.at
Tue Sep 8 05:29:32 EDT 2015


Hi,

On Monday 07 September 2015 23:47:35 Aaron Gray wrote:
> cmake_minimum_required(VERSION 2.6)

Just as a side note: if you need to support cmake 2.6, that's fine. However, 
if you are starting a new project and do not *need* to limit yourself to cmake 
2.6, develop for a cmake version that as new as can be supported by your 
target platforms. (Even if you chose the newest cmake it will get kind of old 
within the lifetime of your project *g*)


> set(CMAKE_AR /usr/bin/ar CACHE FILEPATH "Archiver")

Why do you set CMAKE_AR?

> It runs fine on Windows with MSVC, seems to be failing on MSYS :-

MSVC doesn't use CMAKE_AR, so there should be no problems here. MSYS obviously 
tries to use CMAKE_AR, which you set to the unlikely (on windows) path of 
/usr/bin/ar.

  Johannes


More information about the CMake mailing list