How to specify debug version of CRT library for Visual Studio generator?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to specify debug version of CRT library for Visual Studio generator?

David Aldrich-2
I have a simple CMake project that builds an executable using Visual Studio 2017:

#==============================================

cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

################### Variables. ####################
# Change if you want modify path or other values. #
###################################################

set(PROJECT_NAME CPlaneTest)
# Output Variables
set(OUTPUT_DEBUG Debug/bin)
set(OUTPUT_RELEASE Release/bin)
# Folders files
set(CPP_DIR_1 ./)
set(CPP_DIR_2 ./)
set(CPP_DIR_3 ./)
set(CPP_DIR_4 ./)
set(HEADER_DIR_1 )

############## CMake Project ################
#        The main options of project        #
#############################################

project(${PROJECT_NAME} CXX)

# Define Release by default.
if(NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE "Release")
  message(STATUS "Build type not specified: Use Release by default.")
endif(NOT CMAKE_BUILD_TYPE)

# Definition of Macros
add_definitions(
   -D_CONSOLE
   -DUNICODE
   -D_UNICODE
)

############## Artefacts Output #################
# Defines outputs , depending Debug or Release. #
#################################################

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
  set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_DEBUG}")
  set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_DEBUG}")
  set(CMAKE_EXECUTABLE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_DEBUG}")
else()
  set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_REL}")
  set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_REL}")
  set(CMAKE_EXECUTABLE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OUTPUT_REL}")
endif()

################# Flags ################
# Defines Flags for Windows and Linux. #
########################################

if(MSVC)
   #set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D _DEBUG /W3 /MD /Od /Zi /EHsc")
   set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /W3 /GL /Od /Oi /Gy /Zi /EHsc")
   set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_RELEASE} /D _DEBUG /W3 /GL /Od /Oi /Gy /Zi /EHsc")
endif(MSVC)
if(NOT MSVC)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
   if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
       set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
   endif()
endif(NOT MSVC)

################ Files ################
#   --   Add files to project.   --   #
#######################################

file(GLOB SRC_FILES
    ${CPP_DIR_1}/*.cpp
    ${CPP_DIR_2}/*.cpp
    ${CPP_DIR_3}/*.cpp
    ${CPP_DIR_4}/*.cpp
    ${HEADER_DIR_1}/*.h
)

# Add executable to build.
add_executable(${PROJECT_NAME}
   ${SRC_FILES}
)

if(MSVC)
   target_link_libraries(${PROJECT_NAME} ws2_32.lib )
endif(MSVC)

#=====================================

The Release build succeeds but the Debug build fails with linker errors such as:

[build] CPlaneTest.obj : error LNK2001: unresolved external symbol __imp___CrtDbgReport

I think this is because the linker is not using the debug version of CRT (C Run-time Library).  

Should CMake select the debug build of CRT automatically or do I need to specify it manually? If so, should I do so using CMAKE_EXE_LINKER_FLAGS?

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: How to specify debug version of CRT library for Visual Studio generator?

Eric Dönges
On 18.06.19 12:53, David Aldrich wrote:
> I have a simple CMake project that builds an executable using Visual
> Studio 2017:


>
> ################ Files ################
> #   --   Add files to project.   --   #
> #######################################
>
> file(GLOB SRC_FILES
>     ${CPP_DIR_1}/*.cpp
>     ${CPP_DIR_2}/*.cpp
>     ${CPP_DIR_3}/*.cpp
>     ${CPP_DIR_4}/*.cpp
>     ${HEADER_DIR_1}/*.h
> )
>
> # Add executable to build.
> add_executable(${PROJECT_NAME}
>    ${SRC_FILES}
> )
>
> if(MSVC)
>    target_link_libraries(${PROJECT_NAME} ws2_32.lib )
> endif(MSVC)
>
> #=====================================
>
> The Release build succeeds but the Debug build fails with linker errors
> such as:
>
> [build] CPlaneTest.obj : error LNK2001: unresolved external symbol
> __imp___CrtDbgReport
>
> I think this is because the linker is not using the debug version of CRT
> (C Run-time Library).  
>
> Should CMake select the debug build of CRT automatically or do I need to
> specify it manually? If so, should I do so using CMAKE_EXE_LINKER_FLAGS?
>

CMake will select the correct CRT automatically if you let it (unless
you want the static CRT, in which case you have to override CMake's
default settings). You are setting your CMAKE_CXX_FLAGS_DEBUG incorrectly:

> if(MSVC)
>    #set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D _DEBUG /W3
> /MD /Od /Zi /EHsc")
>    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /W3 /GL /Od
> /Oi /Gy /Zi /EHsc")
>    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_RELEASE} /D _DEBUG /W3
> /GL /Od /Oi /Gy /Zi /EHsc")
> endif(MSVC)

In case of the setting you've commented out, you are explicitly telling
CMake to use /MD. CMAKE_CXX_FLAGS_DEBUG should already contain /MDd, but
since you append the /MD, that is what the compiler will actually use.

For the setting that is not commented out, you set CMAKE_CXX_FLAGS_DEBUG
to the contents of CMAKE_CXX_FLAGS_RELEASE - which is certainly not what
you want (and also specifies /MD).

I would suggest looking at what flags CMake sets by default (look at the
Windows-MSVC.cmake file in CMake's 'Modules/Platform' directory) and
only setting those flags that CMake doesn't already. For version 3.14,
CMake should be setting the following flags for CMAKE_CXX_FLAGS_DEBUG by
default (assuming you are using MVSC >= 1310, no Clang toolset):

        /MDd /Zi /Ob0 /Od /GR /EHSC

So in your case, it would probably be enough to

        string(APPEND CMAKE_CXX_FLAGS_DEBUG " /D_DEBUG /W3")

As a final recommendation, use string(APPEND <var> ...) (or list(APPEND
<list> ...), if the variable is interpreted as a list) when appending
values to existing variables. This makes your intent clearer.


 - when appending compiler flags, use the "string(APPEND ...)" command
to make is clearer what you are doing).
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: How to specify debug version of CRT library for Visual Studio generator?

Robert Maynard
Just a heads up, CMake 3.15 is introducing policy 91 which removes the
runtime library from the default set of flags, and instead has targets
establish what runtime they want.

For more information see:
https://cmake.org/cmake/help/v3.15/prop_tgt/MSVC_RUNTIME_LIBRARY.html

On Tue, Jun 18, 2019 at 10:06 AM Eric Dönges <[hidden email]> wrote:

>
> On 18.06.19 12:53, David Aldrich wrote:
> > I have a simple CMake project that builds an executable using Visual
> > Studio 2017:
>
>
> >
> > ################ Files ################
> > #   --   Add files to project.   --   #
> > #######################################
> >
> > file(GLOB SRC_FILES
> >     ${CPP_DIR_1}/*.cpp
> >     ${CPP_DIR_2}/*.cpp
> >     ${CPP_DIR_3}/*.cpp
> >     ${CPP_DIR_4}/*.cpp
> >     ${HEADER_DIR_1}/*.h
> > )
> >
> > # Add executable to build.
> > add_executable(${PROJECT_NAME}
> >    ${SRC_FILES}
> > )
> >
> > if(MSVC)
> >    target_link_libraries(${PROJECT_NAME} ws2_32.lib )
> > endif(MSVC)
> >
> > #=====================================
> >
> > The Release build succeeds but the Debug build fails with linker errors
> > such as:
> >
> > [build] CPlaneTest.obj : error LNK2001: unresolved external symbol
> > __imp___CrtDbgReport
> >
> > I think this is because the linker is not using the debug version of CRT
> > (C Run-time Library).
> >
> > Should CMake select the debug build of CRT automatically or do I need to
> > specify it manually? If so, should I do so using CMAKE_EXE_LINKER_FLAGS?
> >
>
> CMake will select the correct CRT automatically if you let it (unless
> you want the static CRT, in which case you have to override CMake's
> default settings). You are setting your CMAKE_CXX_FLAGS_DEBUG incorrectly:
>
> > if(MSVC)
> >    #set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D _DEBUG /W3
> > /MD /Od /Zi /EHsc")
> >    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /W3 /GL /Od
> > /Oi /Gy /Zi /EHsc")
> >    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_RELEASE} /D _DEBUG /W3
> > /GL /Od /Oi /Gy /Zi /EHsc")
> > endif(MSVC)
>
> In case of the setting you've commented out, you are explicitly telling
> CMake to use /MD. CMAKE_CXX_FLAGS_DEBUG should already contain /MDd, but
> since you append the /MD, that is what the compiler will actually use.
>
> For the setting that is not commented out, you set CMAKE_CXX_FLAGS_DEBUG
> to the contents of CMAKE_CXX_FLAGS_RELEASE - which is certainly not what
> you want (and also specifies /MD).
>
> I would suggest looking at what flags CMake sets by default (look at the
> Windows-MSVC.cmake file in CMake's 'Modules/Platform' directory) and
> only setting those flags that CMake doesn't already. For version 3.14,
> CMake should be setting the following flags for CMAKE_CXX_FLAGS_DEBUG by
> default (assuming you are using MVSC >= 1310, no Clang toolset):
>
>         /MDd /Zi /Ob0 /Od /GR /EHSC
>
> So in your case, it would probably be enough to
>
>         string(APPEND CMAKE_CXX_FLAGS_DEBUG " /D_DEBUG /W3")
>
> As a final recommendation, use string(APPEND <var> ...) (or list(APPEND
> <list> ...), if the variable is interpreted as a list) when appending
> values to existing variables. This makes your intent clearer.
>
>
>  - when appending compiler flags, use the "string(APPEND ...)" command
> to make is clearer what you are doing).
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: How to specify debug version of CRT library for Visual Studio generator?

David Aldrich-2
In reply to this post by Eric Dönges
> On Tue, Jun 18, 2019 at 3:07 PM Eric Dönges <[hidden email]> wrote:

> On 18.06.19 12:53, David Aldrich wrote:
> > I have a simple CMake project that builds an executable using Visual
> > Studio 2017:
>
>
> >
> > ################ Files ################
> > #   --   Add files to project.   --   #
> > #######################################
> >
> > file(GLOB SRC_FILES
> >     ${CPP_DIR_1}/*.cpp
> >     ${CPP_DIR_2}/*.cpp
> >     ${CPP_DIR_3}/*.cpp
> >     ${CPP_DIR_4}/*.cpp
> >     ${HEADER_DIR_1}/*.h
> > )
> >
> > # Add executable to build.
> > add_executable(${PROJECT_NAME}
> >    ${SRC_FILES}
> > )
> >
> > if(MSVC)
> >    target_link_libraries(${PROJECT_NAME} ws2_32.lib )
> > endif(MSVC)
> >
> > #=====================================
> >
> > The Release build succeeds but the Debug build fails with linker errors
> > such as:
> >
> > [build] CPlaneTest.obj : error LNK2001: unresolved external symbol
> > __imp___CrtDbgReport
> >
> > I think this is because the linker is not using the debug version of CRT
> > (C Run-time Library).  
> >
> > Should CMake select the debug build of CRT automatically or do I need to
> > specify it manually? If so, should I do so using CMAKE_EXE_LINKER_FLAGS?
> >
>
> CMake will select the correct CRT automatically if you let it (unless
> you want the static CRT, in which case you have to override CMake's
> default settings). You are setting your CMAKE_CXX_FLAGS_DEBUG incorrectly:
>
> > if(MSVC)
> >    #set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D _DEBUG /W3
> > /MD /Od /Zi /EHsc")
> >    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /W3 /GL /Od
> > /Oi /Gy /Zi /EHsc")
> >    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_RELEASE} /D _DEBUG /W3
> > /GL /Od /Oi /Gy /Zi /EHsc")
> > endif(MSVC)
>
> In case of the setting you've commented out, you are explicitly telling
> CMake to use /MD. CMAKE_CXX_FLAGS_DEBUG should already contain /MDd, but
> since you append the /MD, that is what the compiler will actually use.
>
> For the setting that is not commented out, you set CMAKE_CXX_FLAGS_DEBUG
> to the contents of CMAKE_CXX_FLAGS_RELEASE - which is certainly not what
> you want (and also specifies /MD).
>
> I would suggest looking at what flags CMake sets by default (look at the
> Windows-MSVC.cmake file in CMake's 'Modules/Platform' directory) and
> only setting those flags that CMake doesn't already. For version 3.14,
> CMake should be setting the following flags for CMAKE_CXX_FLAGS_DEBUG by
> default (assuming you are using MVSC >= 1310, no Clang toolset):
>
>         /MDd /Zi /Ob0 /Od /GR /EHSC
>
> So in your case, it would probably be enough to
>
>         string(APPEND CMAKE_CXX_FLAGS_DEBUG " /D_DEBUG /W3")
>
> As a final recommendation, use string(APPEND <var> ...) (or list(APPEND
> <list> ...), if the variable is interpreted as a list) when appending
> values to existing variables. This makes your intent clearer.
>
>
>  - when appending compiler flags, use the "string(APPEND ...)" command
> to make is clearer what you are doing).

Thanks for your help and advice. I've followed your suggestions and the debug
and release builds are now working correctly. I produced my CMakeLists.txt from
a Visual Studio solution using a conversion utility. I will need to rework
it to adopt best practices.


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: How to specify debug version of CRT library for Visual Studio generator?

David Aldrich-2
In reply to this post by Robert Maynard
> Just a heads up, CMake 3.15 is introducing policy 91 which removes the
> runtime library from the default set of flags, and instead has targets
> establish what runtime they want.  

Thanks for this.

On Tue, Jun 18, 2019 at 7:08 PM Robert Maynard <[hidden email]> wrote:
Just a heads up, CMake 3.15 is introducing policy 91 which removes the
runtime library from the default set of flags, and instead has targets
establish what runtime they want.

For more information see:
https://cmake.org/cmake/help/v3.15/prop_tgt/MSVC_RUNTIME_LIBRARY.html

On Tue, Jun 18, 2019 at 10:06 AM Eric Dönges <[hidden email]> wrote:
>
> On 18.06.19 12:53, David Aldrich wrote:
> > I have a simple CMake project that builds an executable using Visual
> > Studio 2017:
>
>
> >
> > ################ Files ################
> > #   --   Add files to project.   --   #
> > #######################################
> >
> > file(GLOB SRC_FILES
> >     ${CPP_DIR_1}/*.cpp
> >     ${CPP_DIR_2}/*.cpp
> >     ${CPP_DIR_3}/*.cpp
> >     ${CPP_DIR_4}/*.cpp
> >     ${HEADER_DIR_1}/*.h
> > )
> >
> > # Add executable to build.
> > add_executable(${PROJECT_NAME}
> >    ${SRC_FILES}
> > )
> >
> > if(MSVC)
> >    target_link_libraries(${PROJECT_NAME} ws2_32.lib )
> > endif(MSVC)
> >
> > #=====================================
> >
> > The Release build succeeds but the Debug build fails with linker errors
> > such as:
> >
> > [build] CPlaneTest.obj : error LNK2001: unresolved external symbol
> > __imp___CrtDbgReport
> >
> > I think this is because the linker is not using the debug version of CRT
> > (C Run-time Library).
> >
> > Should CMake select the debug build of CRT automatically or do I need to
> > specify it manually? If so, should I do so using CMAKE_EXE_LINKER_FLAGS?
> >
>
> CMake will select the correct CRT automatically if you let it (unless
> you want the static CRT, in which case you have to override CMake's
> default settings). You are setting your CMAKE_CXX_FLAGS_DEBUG incorrectly:
>
> > if(MSVC)
> >    #set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D _DEBUG /W3
> > /MD /Od /Zi /EHsc")
> >    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /W3 /GL /Od
> > /Oi /Gy /Zi /EHsc")
> >    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_RELEASE} /D _DEBUG /W3
> > /GL /Od /Oi /Gy /Zi /EHsc")
> > endif(MSVC)
>
> In case of the setting you've commented out, you are explicitly telling
> CMake to use /MD. CMAKE_CXX_FLAGS_DEBUG should already contain /MDd, but
> since you append the /MD, that is what the compiler will actually use.
>
> For the setting that is not commented out, you set CMAKE_CXX_FLAGS_DEBUG
> to the contents of CMAKE_CXX_FLAGS_RELEASE - which is certainly not what
> you want (and also specifies /MD).
>
> I would suggest looking at what flags CMake sets by default (look at the
> Windows-MSVC.cmake file in CMake's 'Modules/Platform' directory) and
> only setting those flags that CMake doesn't already. For version 3.14,
> CMake should be setting the following flags for CMAKE_CXX_FLAGS_DEBUG by
> default (assuming you are using MVSC >= 1310, no Clang toolset):
>
>         /MDd /Zi /Ob0 /Od /GR /EHSC
>
> So in your case, it would probably be enough to
>
>         string(APPEND CMAKE_CXX_FLAGS_DEBUG " /D_DEBUG /W3")
>
> As a final recommendation, use string(APPEND <var> ...) (or list(APPEND
> <list> ...), if the variable is interpreted as a list) when appending
> values to existing variables. This makes your intent clearer.
>
>
>  - when appending compiler flags, use the "string(APPEND ...)" command
> to make is clearer what you are doing).
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake