Created
September 5, 2015 11:10
-
-
Save Manu343726/5c50b07712b85dabfdc7 to your computer and use it in GitHub Desktop.
Workaround to make VS behave like unique-configuration generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Workaround to make VS behave like unique-configuration generator: | |
| if(WIN32 AND MSVC) | |
| set_target_properties([TARGET] | |
| PROPERTIES EXCLUDE_FROM_ALL TRUE) | |
| # Build [TARGET] using CMAKE_BUILD_TYPE always, as unique-configuration makefiles | |
| add_custom_target(build_msvc ALL | |
| COMMAND ${CMAKE_COMMAND} --build \".\" --target [TARGET] --config ${CMAKE_BUILD_TYPE} | |
| WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) | |
| endif() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment