Skip to content

Commit

Permalink
Fastbuild is a multiconfig generator, tell so to CMake.
Browse files Browse the repository at this point in the history
Also added MinSizeRel and RelWithDebInfo configurations.
Also make sure that no default configuration is passed in CMAKE_BUILD_TYPE.
  • Loading branch information
Charles Huet authored and Charles Huet committed Nov 10, 2015
1 parent e31dd68 commit d335ec0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Modules/CMakeGenericSystem.cmake
Expand Up @@ -67,6 +67,11 @@ if(CMAKE_GENERATOR MATCHES "Ninja")
mark_as_advanced(CMAKE_EXPORT_COMPILE_COMMANDS)
endif()


if(CMAKE_GENERATOR MATCHES "Fastbuild")
set(CMAKE_NO_BUILD_TYPE 1)
endif()

# GetDefaultWindowsPrefixBase
#
# Compute the base directory for CMAKE_INSTALL_PREFIX based on:
Expand Down
2 changes: 2 additions & 0 deletions Source/cmGlobalFastbuildGenerator.cxx
Expand Up @@ -364,6 +364,8 @@ class cmGlobalFastbuildGenerator::Detail::Detection
{
configurations.push_back("Debug");
configurations.push_back("Release");
configurations.push_back("MinSizeRel");
configurations.push_back("RelWithDebInfo");
}

// Reset the entry to have a semi-colon separated list.
Expand Down
2 changes: 2 additions & 0 deletions Source/cmGlobalFastbuildGenerator.h
Expand Up @@ -46,6 +46,8 @@ class cmGlobalFastbuildGenerator
virtual cmLocalGenerator *CreateLocalGenerator();
virtual std::string GetName() const;

virtual bool IsMultiConfig() { return true; }

virtual void AppendDirectoryForConfig(
const std::string& prefix,
const std::string& config,
Expand Down

0 comments on commit d335ec0

Please sign in to comment.