Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 18, 2009, 11:39:32 PM (15 years ago)
Author:
rgrieder
Message:

Improved Visual Studio IntelliSense (tool that suggests function names etc.) performance by excluding all external libraries (headers used in our projects still get parsed) and the compilations (double work otherwise).
Curiously there is no official switch to disable IntelliSense. There's only a local and unofficial version that deals with removing a particular DLL.
However if Microsoft dares to create bugs, we dare to exploit them: Specifying "-Zm1000" instead of "/Zm1000" as compile flag messes with IntelliSense. It once took me half a day to figure that out since the causality between that and "IntelliSense is not working at all for any project" is rather unexpected ;)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/cmake/TargetUtilities.cmake

    r5929 r5963  
    181181  ENDFOREACH(_file)
    182182
     183
     184
    183185  # Add the library/executable
    184186  IF("${_target_type}" STREQUAL "LIBRARY")
     
    190192  ENDIF()
    191193
     194
     195
    192196  # Change library prefix to "lib"
    193197  IF(MSVC AND ${_target_type} STREQUAL "LIBRARY")
     
    195199      PREFIX "lib"
    196200    )
     201  ENDIF()
     202
     203  # MSVC hack to exclude external library sources from the intellisense database
     204  # (IntelliSense stops working when adding "-Zm1000" as compile flag. "/Zm1000"
     205  # would not work because of the slash)
     206  IF(_arg_ORXONOX_EXTERNAL AND MSVC)
     207    SET_TARGET_PROPERTIES(${_target_name} PROPERTIES COMPILE_FLAGS "-Zm1000")
    197208  ENDIF()
    198209
Note: See TracChangeset for help on using the changeset viewer.