Re: [CMake] How to do platform specific setup?

2017-07-26 Thread Robert Dailey
According to Brad King, toolchain files are not intended for what I'm asking about. I recall someone mentioning some built-in modules in CMake that are responsible for toolchain and platform setup, that can be overridden somehow. This is different from toolchain files AFAIK. I apologize for being v

Re: [CMake] How to do platform specific setup?

2017-07-26 Thread Mario Werner
Hi Robert, I usually do all my platform and compiler specific customization in a toolchain file [1]. Such a toolchain file is more or less standard CMake script which get executed before the root CMakeLists.txt from the project is processed. When invoking cmake for the first time you simply specif

[CMake] How to do platform specific setup?

2017-07-19 Thread Robert Dailey
So in one of my top level CMake scripts, I have this: ``` if( ANDROID ) include( android ) _setup_android_platform() elseif( UNIX ) include( unix ) _setup_unix_platform() endif() if( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" ) include( clang ) _setup_clang_toolchain() elseif(