Repository: conan-io/conan

Issue:
cmake_multi does not use Release lib for RelWithDebInfo
Hello,

I'm using cmake_multi generator to build my project using visual studio.
I noticed that cmake_multi does not handel ReleaseWithDebInfo nor MinSizeRel

An example from my conanbuildinfo_multi.cmake

```
add_library(CONAN_PKG::my_package INTERFACE IMPORTED)

# Property INTERFACE_LINK_FLAGS do not work, necessary to add to INTERFACE_LINK_LIBRARIES
set_property(TARGET CONAN_PKG::my_package PROPERTY INTERFACE_LINK_LIBRARIES ${CONAN_PACKAGE_TARGETS_MY_PACKAGE} ${CONAN_SHARED_LINKER_FLAGS_MY_PACKAGE_LIST} ${CONAN_EXE_LINKER_FLAGS_MY_PACKAGE_LIST}
                                                             $<$<CONFIG:Release>:${CONAN_PACKAGE_TARGETS_MY_PACKAGE_RELEASE} ${CONAN_SHARED_LINKER_FLAGS_MY_PACKAGE_RELEASE_LIST} ${CONAN_EXE_LINKER_FLAGS_MY_PACKAGE_RELEASE_LIST}>
                                                             $<$<CONFIG:RelWithDebInfo>:${CONAN_PACKAGE_TARGETS_MY_PACKAGE_RELEASE} ${CONAN_SHARED_LINKER_FLAGS_MY_PACKAGE_RELEASE_LIST} ${CONAN_EXE_LINKER_FLAGS_MY_PACKAGE_RELEASE_LIST}>
                                                             $<$<CONFIG:MinSizeRel>:${CONAN_PACKAGE_TARGETS_MY_PACKAGE_RELEASE} ${CONAN_SHARED_LINKER_FLAGS_MY_PACKAGE_RELEASE_LIST} ${CONAN_EXE_LINKER_FLAGS_MY_PACKAGE_RELEASE_LIST}>
                                                             $<$<CONFIG:Debug>:${CONAN_PACKAGE_TARGETS_MY_PACKAGE_DEBUG} ${CONAN_SHARED_LINKER_FLAGS_MY_PACKAGE_DEBUG_LIST} ${CONAN_EXE_LINKER_FLAGS_MY_PACKAGE_DEBUG_LIST}>
                                                             )
```

Basically, cmake multi generator sets RelWithDebInfo and CONFIG:MinSizeRel libs to Release.


The same issue when loading config files:

```
if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/conanbuildinfo_release.cmake)
    include(${CMAKE_CURRENT_LIST_DIR}/conanbuildinfo_release.cmake)
else()
    message(FATAL_ERROR "No conanbuildinfo_release.cmake, please install the Release conf first")
endif()

if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/conanbuildinfo_debug.cmake)
    include(${CMAKE_CURRENT_LIST_DIR}/conanbuildinfo_debug.cmake)
else()
    message(FATAL_ERROR "No conanbuildinfo_debug.cmake, please install the Debug conf first")
endif()
```

conanbuildinfo_RelWithDebInfo.cmake and conanbuildinfo_MinSizeRel.cmake are not included.

Is it intended to be this way ?  
How can I link RelWithDebInfo library ? 







Discussion:
Yes, I think you are right. @memsharded Any feedback about it? We made the `cmake_find_package_multi` already prepared for `RelWithDebInfo` and `MinSizeRel`. Could it be considered breaking if we change it in the `cmake_multi`? I think this is a bug, but please @memsharded tell us.
I'm affected by this problem too with cmake_multi.

Resolving patch:
diff --git a/conans/client/generators/cmake_common.py b/conans/client/generators/cmake_common.py
--- a/conans/client/generators/cmake_common.py
+++ b/conans/client/generators/cmake_common.py
@@ -115,30 +115,34 @@ def cmake_global_vars(deps, build_type=""):
                                   CONAN_PACKAGE_TARGETS_{uname}_DEBUG "{deps}" "debug" {pkg_name})
     conan_package_library_targets("${{CONAN_LIBS_{uname}_RELEASE}}" "${{CONAN_LIB_DIRS_{uname}_RELEASE}}"
                                   CONAN_PACKAGE_TARGETS_{uname}_RELEASE "{deps}" "release" {pkg_name})
+    conan_package_library_targets("${{CONAN_LIBS_{uname}_RELWITHDEBINFO}}" "${{CONAN_LIB_DIRS_{uname}_RELWITHDEBINFO}}"
+                                  CONAN_PACKAGE_TARGETS_{uname}_RELWITHDEBINFO "{deps}" "relwithdebinfo" {pkg_name})
+    conan_package_library_targets("${{CONAN_LIBS_{uname}_MINSIZEREL}}" "${{CONAN_LIB_DIRS_{uname}_MINSIZEREL}}"
+                                  CONAN_PACKAGE_TARGETS_{uname}_MINSIZEREL "{deps}" "minsizerel" {pkg_name})
 
     add_library({name} INTERFACE IMPORTED)
 
     # Property INTERFACE_LINK_FLAGS do not work, necessary to add to INTERFACE_LINK_LIBRARIES
     set_property(TARGET {name} PROPERTY INTERFACE_LINK_LIBRARIES ${{CONAN_PACKAGE_TARGETS_{uname}}} ${{CONAN_SHARED_LINKER_FLAGS_{uname}_LIST}} ${{CONAN_EXE_LINKER_FLAGS_{uname}_LIST}}
                                                                  $<$<CONFIG:Release>:${{CONAN_PACKAGE_TARGETS_{uname}_RELEASE}} ${{CONAN_SHARED_LINKER_FLAGS_{uname}_RELEASE_LIST}} ${{CONAN_EXE_LINKER_FLAGS_{uname}_RELEASE_LIST}}>
-                                                                 $<$<CONFIG:RelWithDebInfo>:${{CONAN_PACKAGE_TARGETS_{uname}_RELEASE}} ${{CONAN_SHARED_LINKER_FLAGS_{uname}_RELEASE_LIST}} ${{CONAN_EXE_LINKER_FLAGS_{uname}_RELEASE_LIST}}>
-                                                                 $<$<CONFIG:MinSizeRel>:${{CONAN_PACKAGE_TARGETS_{uname}_RELEASE}} ${{CONAN_SHARED_LINKER_FLAGS_{uname}_RELEASE_LIST}} ${{CONAN_EXE_LINKER_FLAGS_{uname}_RELEASE_LIST}}>
+                                                                 $<$<CONFIG:RelWithDebInfo>:${{CONAN_PACKAGE_TARGETS_{uname}_RELWITHDEBINFO}} ${{CONAN_SHARED_LINKER_FLAGS_{uname}_RELWITHDEBINFO_LIST}} ${{CONAN_EXE_LINKER_FLAGS_{uname}_RELWITHDEBINFO_LIST}}>
+                                                                 $<$<CONFIG:MinSizeRel>:${{CONAN_PACKAGE_TARGETS_{uname}_MINSIZEREL}} ${{CONAN_SHARED_LINKER_FLAGS_{uname}_MINSIZEREL_LIST}} ${{CONAN_EXE_LINKER_FLAGS_{uname}_MINSIZEREL_LIST}}>
                                                                  $<$<CONFIG:Debug>:${{CONAN_PACKAGE_TARGETS_{uname}_DEBUG}} ${{CONAN_SHARED_LINKER_FLAGS_{uname}_DEBUG_LIST}} ${{CONAN_EXE_LINKER_FLAGS_{uname}_DEBUG_LIST}}>
                                                                  {deps})
     set_property(TARGET {name} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${{CONAN_INCLUDE_DIRS_{uname}}}
                                                                       $<$<CONFIG:Release>:${{CONAN_INCLUDE_DIRS_{uname}_RELEASE}}>
-                                                                      $<$<CONFIG:RelWithDebInfo>:${{CONAN_INCLUDE_DIRS_{uname}_RELEASE}}>
-                                                                      $<$<CONFIG:MinSizeRel>:${{CONAN_INCLUDE_DIRS_{uname}_RELEASE}}>
+                                                                      $<$<CONFIG:RelWithDebInfo>:${{CONAN_INCLUDE_DIRS_{uname}_RELWITHDEBINFO}}>
+                                                                      $<$<CONFIG:MinSizeRel>:${{CONAN_INCLUDE_DIRS_{uname}_MINSIZEREL}}>
                                                                       $<$<CONFIG:Debug>:${{CONAN_INCLUDE_DIRS_{uname}_DEBUG}}>)
     set_property(TARGET {name} PROPERTY INTERFACE_COMPILE_DEFINITIONS ${{CONAN_COMPILE_DEFINITIONS_{uname}}}
                                                                       $<$<CONFIG:Release>:${{CONAN_COMPILE_DEFINITIONS_{uname}_RELEASE}}>
-                                                                      $<$<CONFIG:RelWithDebInfo>:${{CONAN_COMPILE_DEFINITIONS_{uname}_RELEASE}}>
-                                                                      $<$<CONFIG:MinSizeRel>:${{CONAN_COMPILE_DEFINITIONS_{uname}_RELEASE}}>
+                                                                      $<$<CONFIG:RelWithDebInfo>:${{CONAN_COMPILE_DEFINITIONS_{uname}_RELWITHDEBINFO}}>
+                                                                      $<$<CONFIG:MinSizeRel>:${{CONAN_COMPILE_DEFINITIONS_{uname}_MINSIZEREL}}>
                                                                       $<$<CONFIG:Debug>:${{CONAN_COMPILE_DEFINITIONS_{uname}_DEBUG}}>)
     set_property(TARGET {name} PROPERTY INTERFACE_COMPILE_OPTIONS ${{CONAN_C_FLAGS_{uname}_LIST}} ${{CONAN_CXX_FLAGS_{uname}_LIST}}
                                                                   $<$<CONFIG:Release>:${{CONAN_C_FLAGS_{uname}_RELEASE_LIST}} ${{CONAN_CXX_FLAGS_{uname}_RELEASE_LIST}}>
-                                                                  $<$<CONFIG:RelWithDebInfo>:${{CONAN_C_FLAGS_{uname}_RELEASE_LIST}} ${{CONAN_CXX_FLAGS_{uname}_RELEASE_LIST}}>
-                                                                  $<$<CONFIG:MinSizeRel>:${{CONAN_C_FLAGS_{uname}_RELEASE_LIST}} ${{CONAN_CXX_FLAGS_{uname}_RELEASE_LIST}}>
+                                                                  $<$<CONFIG:RelWithDebInfo>:${{CONAN_C_FLAGS_{uname}_RELWITHDEBINFO_LIST}} ${{CONAN_CXX_FLAGS_{uname}_RELWITHDEBINFO_LIST}}>
+                                                                  $<$<CONFIG:MinSizeRel>:${{CONAN_C_FLAGS_{uname}_MINSIZEREL_LIST}} ${{CONAN_CXX_FLAGS_{uname}_MINSIZEREL_LIST}}>
                                                                   $<$<CONFIG:Debug>:${{CONAN_C_FLAGS_{uname}_DEBUG_LIST}}  ${{CONAN_CXX_FLAGS_{uname}_DEBUG_LIST}}>)
 """
 
@@ -487,14 +491,14 @@ def generate_targets_section(dependencies):
     if(CONAN_SYSTEM_INCLUDES)
         include_directories(SYSTEM ${CONAN_INCLUDE_DIRS}
                                    "$<$<CONFIG:Release>:${CONAN_INCLUDE_DIRS_RELEASE}>"
-                                   "$<$<CONFIG:RelWithDebInfo>:${CONAN_INCLUDE_DIRS_RELEASE}>"
-                                   "$<$<CONFIG:MinSizeRel>:${CONAN_INCLUDE_DIRS_RELEASE}>"
+                                   "$<$<CONFIG:RelWithDebInfo>:${CONAN_INCLUDE_DIRS_RELWITHDEBINFO}>"
+                                   "$<$<CONFIG:MinSizeRel>:${CONAN_INCLUDE_DIRS_MINSIZEREL}>"
                                    "$<$<CONFIG:Debug>:${CONAN_INCLUDE_DIRS_DEBUG}>")
     else()
         include_directories(${CONAN_INCLUDE_DIRS}
                             "$<$<CONFIG:Release>:${CONAN_INCLUDE_DIRS_RELEASE}>"
-                            "$<$<CONFIG:RelWithDebInfo>:${CONAN_INCLUDE_DIRS_RELEASE}>"
-                            "$<$<CONFIG:MinSizeRel>:${CONAN_INCLUDE_DIRS_RELEASE}>"
+                            "$<$<CONFIG:RelWithDebInfo>:${CONAN_INCLUDE_DIRS_RELWITHDEBINFO}>"
+                            "$<$<CONFIG:MinSizeRel>:${CONAN_INCLUDE_DIRS_MINSIZEREL}>"
                             "$<$<CONFIG:Debug>:${CONAN_INCLUDE_DIRS_DEBUG}>")
     endif()
 
@@ -504,12 +508,16 @@ def generate_targets_section(dependencies):
                                   CONAN_LIBS_DEBUG)
     conan_find_libraries_abs_path("${CONAN_LIBS_RELEASE}" "${CONAN_LIB_DIRS_RELEASE}"
                                   CONAN_LIBS_RELEASE)
+    conan_find_libraries_abs_path("${CONAN_LIBS_RELWITHDEBINFO}" "${CONAN_LIB_DIRS_RELWITHDEBINFO}"
+                                  CONAN_LIBS_RELWITHDEBINFO)
+    conan_find_libraries_abs_path("${CONAN_LIBS_MINSIZEREL}" "${CONAN_LIB_DIRS_MINSIZEREL}"
+                                  CONAN_LIBS_MINSIZEREL)
 
     add_compile_options(${CONAN_DEFINES}
                         "$<$<CONFIG:Debug>:${CONAN_DEFINES_DEBUG}>"
                         "$<$<CONFIG:Release>:${CONAN_DEFINES_RELEASE}>"
-                        "$<$<CONFIG:RelWithDebInfo>:${CONAN_DEFINES_RELEASE}>"
-                        "$<$<CONFIG:MinSizeRel>:${CONAN_DEFINES_RELEASE}>")
+                        "$<$<CONFIG:RelWithDebInfo>:${CONAN_DEFINES_RELWITHDEBINFO}>"
+                        "$<$<CONFIG:MinSizeRel>:${CONAN_DEFINES_MINSIZEREL}>")
 
     conan_set_flags("")
     conan_set_flags("_RELEASE")
@@ -671,6 +679,14 @@ def _conan_basic_setup_common(addtional_macros, cmake_multi=False):
     message(FATAL_ERROR "No conanbuildinfo_debug.cmake, please install the Debug conf first")
 endif()
 
+if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/conanbuildinfo_minsizerel.cmake)
+    include(${CMAKE_CURRENT_LIST_DIR}/conanbuildinfo_minsizerel.cmake)
+endif()
+
+if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/conanbuildinfo_relwithdebinfo.cmake)
+    include(${CMAKE_CURRENT_LIST_DIR}/conanbuildinfo_relwithdebinfo.cmake)
+endif()
+
 macro(conan_set_vs_runtime)
     # This conan_set_vs_runtime is MORE opinionated than the regular one. It will
     # Leave the defaults MD (MDd) or replace them with MT (MTd) but taking into account the
@@ -694,12 +710,19 @@ def _conan_basic_setup_common(addtional_macros, cmake_multi=False):
 
 macro(conan_set_find_paths)
     if(CMAKE_BUILD_TYPE)
+        MESSAGE("BUILD TYPE: ${CMAKE_BUILD_TYPE}")
         if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
             set(CMAKE_PREFIX_PATH ${CONAN_CMAKE_MODULE_PATH_DEBUG} ${CMAKE_PREFIX_PATH})
             set(CMAKE_MODULE_PATH ${CONAN_CMAKE_MODULE_PATH_DEBUG} ${CMAKE_MODULE_PATH})
-        else()
+        elseif(${CMAKE_BUILD_TYPE} MATCHES "Release")
             set(CMAKE_PREFIX_PATH ${CONAN_CMAKE_MODULE_PATH_RELEASE} ${CMAKE_PREFIX_PATH})
             set(CMAKE_MODULE_PATH ${CONAN_CMAKE_MODULE_PATH_RELEASE} ${CMAKE_MODULE_PATH})
+        elseif(${CMAKE_BUILD_TYPE} MATCHES "RelWithDebInfo")
+            set(CMAKE_PREFIX_PATH ${CONAN_CMAKE_MODULE_PATH_RELWITHDEBINFO} ${CMAKE_PREFIX_PATH})
+            set(CMAKE_MODULE_PATH ${CONAN_CMAKE_MODULE_PATH_RELWITHDEBINFO} ${CMAKE_MODULE_PATH})
+        elseif(${CMAKE_BUILD_TYPE} MATCHES "MinSizeRel")
+            set(CMAKE_PREFIX_PATH ${CONAN_CMAKE_MODULE_PATH_MINSIZEREL} ${CMAKE_PREFIX_PATH})
+            set(CMAKE_MODULE_PATH ${CONAN_CMAKE_MODULE_PATH_MINSIZEREL} ${CMAKE_MODULE_PATH})
         endif()
     endif()
 endmacro()


Test patch:
diff --git a/conans/test/functional/generators/cmake_multi_test.py b/conans/test/functional/generators/cmake_multi_test.py
--- a/conans/test/functional/generators/cmake_multi_test.py
+++ b/conans/test/functional/generators/cmake_multi_test.py
@@ -152,7 +152,10 @@ def package(self):
 
         client.save({"conanfile.py": conanfile,
                      "Debug/FindHello.cmake": 'message(STATUS "FIND HELLO DEBUG!")',
-                     "Release/FindHello.cmake": 'message(STATUS "FIND HELLO RELEASE!")'})
+                     "Release/FindHello.cmake": 'message(STATUS "FIND HELLO RELEASE!")',
+                     "RelWithDebInfo/FindHello.cmake": 'message(STATUS "FIND HELLO RELWITHDEBINFO!")',
+                     "MinSizeRel/FindHello.cmake": 'message(STATUS "FIND HELLO MINSIZEREL!")'
+                     })
         client.run("export . lasote/testing")
         cmake = """set(CMAKE_CXX_COMPILER_WORKS 1)
 project(MyHello CXX)
@@ -172,6 +175,8 @@ class HelloConan(ConanFile):
 
         client.run("install . --build=missing ")
         client.run("install . -s build_type=Debug --build=missing ")
+        client.run("install . -s build_type=RelWithDebInfo --build=missing ")
+        client.run("install . -s build_type=MinSizeRel --build=missing ")
 
         with remove_from_path("sh"):
             generator = "MinGW Makefiles" if platform.system() == "Windows" else "Unix Makefiles"
@@ -186,6 +191,16 @@ class HelloConan(ConanFile):
             self.assertIn("FIND HELLO RELEASE!", client.user_io.out)
             self.assertNotIn("FIND HELLO DEBUG!", client.user_io.out)
 
+            client.init_dynamic_vars()  # to reset output
+            client.runner('cmake . -G "%s" -DCMAKE_BUILD_TYPE=RelWithDebInfo' % generator,
+                          cwd=client.current_folder)
+            self.assertIn("FIND HELLO RELWITHDEBINFO!", client.user_io.out)
+
+            client.init_dynamic_vars()  # to reset output
+            client.runner('cmake . -G "%s" -DCMAKE_BUILD_TYPE=MinSizeRel' % generator,
+                          cwd=client.current_folder)
+            self.assertIn("FIND HELLO MINSIZEREL!", client.user_io.out)
+
     @unittest.skipUnless(platform.system() in ["Windows", "Darwin"], "Exclude Linux")
     def cmake_multi_test(self):
         client = TestClient()
@@ -206,16 +221,20 @@ def cmake_multi_test(self):
             release_install = ''
 
         # better in one test instead of two, because install time is amortized
-        for cmake_file in (cmake, cmake_targets, ):
+        for cmake_file in (cmake_targets, cmake):
             client.save({"conanfile.txt": conanfile,
                          "CMakeLists.txt": cmake_file,
                          "main.cpp": main}, clean_first=True)
             client.run('install . -s build_type=Debug %s --build=missing' % debug_install)
             client.run('install . -s build_type=Release %s --build=missing' % release_install)
+            client.run('install . -s build_type=RelWithDebInfo %s --build=missing' % release_install)
+            client.run('install . -s build_type=MinSizeRel %s --build=missing' % release_install)
 
             client.runner('cmake . -G "%s"' % generator, cwd=client.current_folder)
             self.assertNotIn("WARN: Unknown compiler '", client.user_io.out)
             self.assertNotIn("', skipping the version check...", client.user_io.out)
+
+            # Debug
             client.runner('cmake --build . --config Debug', cwd=client.current_folder)
             hello_comand = os.sep.join([".", "Debug", "say_hello"])
             client.runner(hello_comand, cwd=client.current_folder)
@@ -224,6 +243,8 @@ def cmake_multi_test(self):
             self.assertIn("Hello0Def:Debug Hello1Def:Debug", client.user_io.out)
             self.assertIn("Hello Debug Hello1", client.user_io.out)
             self.assertIn("Hello Debug Hello0", client.user_io.out)
+
+            # Release
             client.runner('cmake --build . --config Release', cwd=client.current_folder)
             hello_comand = os.sep.join([".", "Release", "say_hello"])
             client.runner(hello_comand, cwd=client.current_folder)
@@ -237,6 +258,26 @@ def cmake_multi_test(self):
             else:
                 self.assertIn("Conan: Using cmake global configuration", client.user_io.out)
 
+            # RelWithDebInfo
+            client.runner('cmake --build . --config RelWithDebInfo', cwd=client.current_folder)
+            hello_comand = os.sep.join([".", "RelWithDebInfo", "say_hello"])
+            client.runner(hello_comand, cwd=client.current_folder)
+
+            self.assertIn("Hello0:RelWithDebInfo Hello1:RelWithDebInfo", client.user_io.out)
+            self.assertIn("Hello0Def:RelWithDebInfo Hello1Def:RelWithDebInfo", client.user_io.out)
+            self.assertIn("Hello Release Hello1", client.user_io.out)
+            self.assertIn("Hello Release Hello0", client.user_io.out)
+
+            # MinSizeRel
+            client.runner('cmake --build . --config MinSizeRel', cwd=client.current_folder)
+            hello_comand = os.sep.join([".", "MinSizeRel", "say_hello"])
+            client.runner(hello_comand, cwd=client.current_folder)
+
+            self.assertIn("Hello0:MinSizeRel Hello1:MinSizeRel", client.user_io.out)
+            self.assertIn("Hello0Def:MinSizeRel Hello1Def:MinSizeRel", client.user_io.out)
+            self.assertIn("Hello Release Hello1", client.user_io.out)
+            self.assertIn("Hello Release Hello0", client.user_io.out)
+
 
 class CMakeMultiSyntaxTest(unittest.TestCase):
 
diff --git a/conans/test/utils/multi_config.py b/conans/test/utils/multi_config.py
--- a/conans/test/utils/multi_config.py
+++ b/conans/test/utils/multi_config.py
@@ -17,8 +17,10 @@ def build(self):
             self.run(cmd)
             self.run("cmake --build . --config Debug")
             self.run("cmake --build . --config Release")
+            self.run("cmake --build . --config RelWithDebInfo")
+            self.run("cmake --build . --config MinSizeRel")
         else:
-            for config in ("Debug", "Release"):
+            for config in ("Debug", "Release", "RelWithDebInfo", "MinSizeRel"):
                 self.output.info("Building %s" % config)
                 self.run('cmake "%s" %s -DCMAKE_BUILD_TYPE=%s'
                          % (self.source_folder, cmake.command_line, config))
@@ -35,10 +37,17 @@ def package(self):
     def package_info(self):
         self.cpp_info.release.libs = ["hello{name}"]
         self.cpp_info.debug.libs = ["hello{name}_d"]
+        self.cpp_info.relwithdebinfo.libs = ["hello{name}_relwithdebinfo"]
+        self.cpp_info.minsizerel.libs = ["hello{name}_minsizerel"]
+        
         self.cpp_info.release.defines = ['HELLO{name}DEFINE="Release"',
                                          'HELLO{name}BUILD="Release"']
         self.cpp_info.debug.defines = ['HELLO{name}DEFINE="Debug"',
                                        'HELLO{name}BUILD="Debug"']
+        self.cpp_info.relwithdebinfo.defines = ['HELLO{name}DEFINE="RelWithDebInfo"',
+                                                'HELLO{name}BUILD="RelWithDebInfo"']
+        self.cpp_info.minsizerel.defines = ['HELLO{name}DEFINE="MinSizeRel"',
+                                            'HELLO{name}BUILD="MinSizeRel"']
 """
 
 testconanfile = """
@@ -111,9 +120,13 @@ def test(self):
 
 add_library(hello{name} hello.cpp)
 set_target_properties(hello{name} PROPERTIES DEBUG_POSTFIX _d)
+set_target_properties(hello{name} PROPERTIES MINSIZEREL_POSTFIX _minsizerel)
+set_target_properties(hello{name} PROPERTIES RELWITHDEBINFO_POSTFIX _relwithdebinfo)
 conan_target_link_libraries(hello{name})
 add_executable(say_hello main.cpp)
 set_target_properties(say_hello PROPERTIES DEBUG_POSTFIX _d)
+set_target_properties(hello{name} PROPERTIES MINSIZEREL_POSTFIX _minsizerel)
+set_target_properties(hello{name} PROPERTIES RELWITHDEBINFO_POSTFIX _relwithdebinfo)
 target_link_libraries(say_hello hello{name})
 
 """