[CMake] Running a command after generation of Makefile

Johny Johny.Jose at cern.ch
Thu Aug 26 04:00:38 EDT 2010


I do not want all the include flags to be isystem, only one. I'm using 
cmake version 2.8.2

Cheers,
Johny

On 08/25/2010 09:46 PM, Bill Hoffman wrote:
> On Wed, Aug 25, 2010 at 3:01 PM, Michael Wild<themiwi at gmail.com>  wrote:
>    
>> On 25. Aug, 2010, at 18:57 , Johny wrote:
>>
>>      
>>> Hey,
>>>
>>> I was trying to use the SYSTEM option in the include_directories command , however it does not seem to work on the MACOSX platform. So i wrote a little fix which basically replaces all the -I${foldername} with -isystem ${foldername}. However these commands need to be executed after my makefiles are generated and i wud like to not have the user execute another cmake script before running make. Is it possible?
>>>
>>> Cheers,
>>> Johny
>>>        
>> If you want *all* -I to be replaced by -isystem, simply set the CMAKE_INCLUDE_FLAG_C and CMAKE_INCLUDE_FLAG_CXX variables to -isystem.
>>
>> Michael
>>      
> What version of CMake?
>
> Platforms/Darwin.cmake has this in git master:
> # Xcode does not support -isystem yet.
> IF(XCODE)
>    SET(CMAKE_INCLUDE_SYSTEM_FLAG_C)
>    SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
> ENDIF(XCODE)
>
> I seem to remember it doing that by default in older versions...
>
> -Bill
>    



More information about the CMake mailing list