Add Visual C++ property sheets using CMake

后端 未结 3 1736
独厮守ぢ
独厮守ぢ 2021-02-18 19:07

I\'m currently porting a gcc project to Visual C++. It\'s defined in a CMake file, and I have created a Visual C++ property sheet to aid in compatibility (GccCompat.props). Ever

3条回答
  •  一向
    一向 (楼主)
    2021-02-18 19:30

    Not sure which properties you need. A few could be set directly in CMake, like in this example for multiple configurations:

    set (CMAKE_CONFIGURATION_TYPES "A;B;C;D" CACHE STRING "Configurations" FORCE)
    
    foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
    
        set (CMAKE_CXX_FLAGS_${OUTPUTCONFIG}                "/ZI /Od")
        set (CMAKE_EXE_LINKER_FLAGS_${OUTPUTCONFIG}         "/debug")
    
    endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
    

    Apart from variables listed here, I think CMake has no possibility to attach property sheets.

提交回复
热议问题