[CMake] COMPILE_DEFINITIONS_Debug doesn't work in Windows
Hi All! I need to add some preprocessor definitions to my target. Here is the code: if (WIN32) set (COMPILE_DEFINITIONS_Debug _DEBUG USE_MP3READER2 _EXPORTS _USRDLL _CRT_SECURE_NO_WARNINGS _USE_32BIT_TIME_T ) set (COMPILE_DEFINITIONS_Release NDEBUG USE_MP3READER2 _EXPORTS _USRDLL _CRT_SECURE_NO_WARNINGS _USE_32BIT_TIME_T ) else(WIN32) set (COMPILE_DEFINITIONS_Debug _DEBUG USE_MP3READER2 ) set (COMPILE_DEFINITIONS_Release NDEBUG USE_MP3READER2 ) endif(WIN32) But when I open Debug configuration of my VS2008 project I see WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR=\"Debug\" Does someone happen to know how to fix it? - WBR, Vyacheslav. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] COMPILE_DEFINITIONS_Debug doesn't work in Windows
> Hi All! > > I need to add some preprocessor definitions to my target. > Here is the code: > > if (WIN32) > set (COMPILE_DEFINITIONS_Debug > _DEBUG > USE_MP3READER2 > _EXPORTS > _USRDLL > _CRT_SECURE_NO_WARNINGS > _USE_32BIT_TIME_T > ) > > set (COMPILE_DEFINITIONS_Release > NDEBUG > USE_MP3READER2 > _EXPORTS > _USRDLL > _CRT_SECURE_NO_WARNINGS > _USE_32BIT_TIME_T > ) > else(WIN32) > > set (COMPILE_DEFINITIONS_Debug > _DEBUG > USE_MP3READER2 > ) > > set (COMPILE_DEFINITIONS_Release > NDEBUG > USE_MP3READER2 > ) > endif(WIN32) > > > But when I open Debug configuration of my VS2008 project I see > > WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR=\"Debug\" > > Does someone happen to know how to fix it? COMPILE_DEFINITIONS is not a variable, it's a global property. As such you need to call set_property(GLOBAL PROPERTY COMPILE_DEFINITIONS_DEBUG "...") Please note that you also need to uppercase the build type. Eike -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] COMPILE_DEFINITIONS_Debug doesn't work in Windows
It also doesn't work set_property(GLOBAL PROPERTY COMPILE_DEFINITIONS_DEBUG "USE_MP3READER2;DLL_EXPORTS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T") set_property(GLOBAL PROPERTY COMPILE_DEFINITIONS_RELEASE "USE_MP3READER2;DLL_EXPORTS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T") 17.04.2012 11:04, Rolf Eike Beer написал: Hi All! I need to add some preprocessor definitions to my target. Here is the code: if (WIN32) set (COMPILE_DEFINITIONS_Debug _DEBUG USE_MP3READER2 _EXPORTS _USRDLL _CRT_SECURE_NO_WARNINGS _USE_32BIT_TIME_T ) set (COMPILE_DEFINITIONS_Release NDEBUG USE_MP3READER2 _EXPORTS _USRDLL _CRT_SECURE_NO_WARNINGS _USE_32BIT_TIME_T ) else(WIN32) set (COMPILE_DEFINITIONS_Debug _DEBUG USE_MP3READER2 ) set (COMPILE_DEFINITIONS_Release NDEBUG USE_MP3READER2 ) endif(WIN32) But when I open Debug configuration of my VS2008 project I see WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR=\"Debug\" Does someone happen to know how to fix it? COMPILE_DEFINITIONS is not a variable, it's a global property. As such you need to call set_property(GLOBAL PROPERTY COMPILE_DEFINITIONS_DEBUG "...") Please note that you also need to uppercase the build type. Eike -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] COMPILE_DEFINITIONS_Debug doesn't work in Windows(SOLVED)
But this if (WIN32) set_property(TARGET ${lib_name} PROPERTY COMPILE_DEFINITIONS_DEBUG USE_MP3READER2 DLL_EXPORTS _USRDLL _CRT_SECURE_NO_WARNINGS _USE_32BIT_TIME_T) set_property(TARGET ${lib_name} PROPERTY COMPILE_DEFINITIONS_RELEASE USE_MP3READER2;DLL_EXPORTS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T) else(WIN32) set_property(TARGET ${lib_name} PROPERTY COMPILE_DEFINITIONS_DEBUG USE_MP3READER2) set_property(TARGET ${lib_name} PROPERTY COMPILE_DEFINITIONS_RELEASE USE_MP3READER2) endif(WIN32) works fine, thanks! 17.04.2012 11:19, Vyacheslav Karamov написал: It also doesn't work set_property(GLOBAL PROPERTY COMPILE_DEFINITIONS_DEBUG "USE_MP3READER2;DLL_EXPORTS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T") set_property(GLOBAL PROPERTY COMPILE_DEFINITIONS_RELEASE "USE_MP3READER2;DLL_EXPORTS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T") 17.04.2012 11:04, Rolf Eike Beer написал: Hi All! I need to add some preprocessor definitions to my target. Here is the code: if (WIN32) set (COMPILE_DEFINITIONS_Debug _DEBUG USE_MP3READER2 _EXPORTS _USRDLL _CRT_SECURE_NO_WARNINGS _USE_32BIT_TIME_T ) set (COMPILE_DEFINITIONS_Release NDEBUG USE_MP3READER2 _EXPORTS _USRDLL _CRT_SECURE_NO_WARNINGS _USE_32BIT_TIME_T ) else(WIN32) set (COMPILE_DEFINITIONS_Debug _DEBUG USE_MP3READER2 ) set (COMPILE_DEFINITIONS_Release NDEBUG USE_MP3READER2 ) endif(WIN32) But when I open Debug configuration of my VS2008 project I see WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR=\"Debug\" Does someone happen to know how to fix it? COMPILE_DEFINITIONS is not a variable, it's a global property. As such you need to call set_property(GLOBAL PROPERTY COMPILE_DEFINITIONS_DEBUG "...") Please note that you also need to uppercase the build type. Eike -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] find_library in Windows
Hi All! I have a problem with find_library in Windows. It does find static library, but not import library. It's confusing to me. if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") find_library(spinx NAMES sphinxbase ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Release ) find_library(spinx_debug NAMES sphinxbased ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Debug ) endif() if (NOT spinx) message(STATUS "SphinX library has not been found") endif() if (NOT spinx_debug) message(STATUS "Debug version of SphinX library has not been found") endif() Nor debug neither release versions have been found. This is strange, because I have ../../Sphinx/sphinxbase/bin/Debug/sphinxbased.dll ../../Sphinx/sphinxbase/bin/Debug/sphinxbase.lib and ../../Sphinx/sphinxbase/bin/Release/sphinxbase.dll ../../Sphinx/sphinxbase/bin/Release/sphinxbase.lib I also tried another approach: link_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Release ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Debug ) target_link_libraries(${lib_name} debug ${do_scoring_debug} sphinxbased ) target_link_libraries(${lib_name} optimized ${do_scoring} sphinxbase ) but in this case both debug and release versions of sphinxbase are linked with my target library. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] COMPILE_DEFINITIONS_Debug doesn't work in Windows
> It also doesn't work > > set_property(GLOBAL PROPERTY COMPILE_DEFINITIONS_DEBUG > "USE_MP3READER2;DLL_EXPORTS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T") > > set_property(GLOBAL PROPERTY COMPILE_DEFINITIONS_RELEASE > "USE_MP3READER2;DLL_EXPORTS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T") Did you use that code before the add_executable() or add_library()? Eike -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] COMPILE_DEFINITIONS_Debug doesn't work in Windows
Yes I do. 17.04.2012 11:49, Rolf Eike Beer написал: It also doesn't work set_property(GLOBAL PROPERTY COMPILE_DEFINITIONS_DEBUG "USE_MP3READER2;DLL_EXPORTS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T") set_property(GLOBAL PROPERTY COMPILE_DEFINITIONS_RELEASE "USE_MP3READER2;DLL_EXPORTS;_USRDLL;_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T") Did you use that code before the add_executable() or add_library()? Eike -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] find_library in Windows
This code doesn't work also: if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") find_library(spinx NAME sphinxbase HINTS "${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Release" DOC "SphinX release library" ) find_library(spinx_debug NAME sphinxbased PATHS ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Debug DOC "SphinX debug library" ) endif() 17.04.2012 11:47, Vyacheslav Karamov написал: Hi All! I have a problem with find_library in Windows. It does find static library, but not import library. It's confusing to me. if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") find_library(spinx NAMES sphinxbase ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Release ) find_library(spinx_debug NAMES sphinxbased ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Debug ) endif() if (NOT spinx) message(STATUS "SphinX library has not been found") endif() if (NOT spinx_debug) message(STATUS "Debug version of SphinX library has not been found") endif() Nor debug neither release versions have been found. This is strange, because I have ../../Sphinx/sphinxbase/bin/Debug/sphinxbased.dll ../../Sphinx/sphinxbase/bin/Debug/sphinxbase.lib and ../../Sphinx/sphinxbase/bin/Release/sphinxbase.dll ../../Sphinx/sphinxbase/bin/Release/sphinxbase.lib I also tried another approach: link_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Release ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Debug ) target_link_libraries(${lib_name} debug ${do_scoring_debug} sphinxbased ) target_link_libraries(${lib_name} optimized ${do_scoring} sphinxbase ) but in this case both debug and release versions of sphinxbase are linked with my target library. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] find_library in Windows
When I specified full library name with extension find_library worked. But still have both debug and release versions of library being linked with my target. 17.04.2012 12:13, Vyacheslav Karamov написал: This code doesn't work also: if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") find_library(spinx NAME sphinxbase HINTS "${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Release" DOC "SphinX release library" ) find_library(spinx_debug NAME sphinxbased PATHS ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Debug DOC "SphinX debug library" ) endif() 17.04.2012 11:47, Vyacheslav Karamov написал: Hi All! I have a problem with find_library in Windows. It does find static library, but not import library. It's confusing to me. if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") find_library(spinx NAMES sphinxbase ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Release ) find_library(spinx_debug NAMES sphinxbased ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Debug ) endif() if (NOT spinx) message(STATUS "SphinX library has not been found") endif() if (NOT spinx_debug) message(STATUS "Debug version of SphinX library has not been found") endif() Nor debug neither release versions have been found. This is strange, because I have ../../Sphinx/sphinxbase/bin/Debug/sphinxbased.dll ../../Sphinx/sphinxbase/bin/Debug/sphinxbase.lib and ../../Sphinx/sphinxbase/bin/Release/sphinxbase.dll ../../Sphinx/sphinxbase/bin/Release/sphinxbase.lib I also tried another approach: link_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Release ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Debug ) target_link_libraries(${lib_name} debug ${do_scoring_debug} sphinxbased ) target_link_libraries(${lib_name} optimized ${do_scoring} sphinxbase ) but in this case both debug and release versions of sphinxbase are linked with my target library. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] find_library in Windows(SOLVED)
I'm happy. It works! target_link_libraries(${lib_name} debug ${do_scoring_debug} debug ${spinx_debug} optimized ${do_scoring} optimized ${spinx} ) 17.04.2012 14:59, Vyacheslav Karamov написал: When I specified full library name with extension find_library worked. But still have both debug and release versions of library being linked with my target. 17.04.2012 12:13, Vyacheslav Karamov написал: This code doesn't work also: if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") find_library(spinx NAME sphinxbase HINTS "${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Release" DOC "SphinX release library" ) find_library(spinx_debug NAME sphinxbased PATHS ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Debug DOC "SphinX debug library" ) endif() 17.04.2012 11:47, Vyacheslav Karamov написал: Hi All! I have a problem with find_library in Windows. It does find static library, but not import library. It's confusing to me. if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") find_library(spinx NAMES sphinxbase ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Release ) find_library(spinx_debug NAMES sphinxbased ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Debug ) endif() if (NOT spinx) message(STATUS "SphinX library has not been found") endif() if (NOT spinx_debug) message(STATUS "Debug version of SphinX library has not been found") endif() Nor debug neither release versions have been found. This is strange, because I have ../../Sphinx/sphinxbase/bin/Debug/sphinxbased.dll ../../Sphinx/sphinxbase/bin/Debug/sphinxbase.lib and ../../Sphinx/sphinxbase/bin/Release/sphinxbase.dll ../../Sphinx/sphinxbase/bin/Release/sphinxbase.lib I also tried another approach: link_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Release ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Debug ) target_link_libraries(${lib_name} debug ${do_scoring_debug} sphinxbased ) target_link_libraries(${lib_name} optimized ${do_scoring} sphinxbase ) but in this case both debug and release versions of sphinxbase are linked with my target library. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] add_subdirectory inheritance
Hi, (as no one answered to my previous email, let me add this: multiplatform project with few million lines of code, sheer size of the project is not allowing to turn around whole directory tree as price / performance is a very relevant factor and even rewriting makefiles/vcprojs to cmake will take months) The add_subdirectory inheritance striked which is practically a show stopper, it was already discussed here http://www.mail-archive.com/cmake@cmake.org/msg34291.html What was proposed (DONT_INHERIT) was a great idea and improvement to versability of CMake and also harmless for backward compatibility so i dont really understand why forcing subproject to inherit all the settings. Yes, what is added with add_subdirectory is not a child but a sibling or even some other part of the tree but the point is that it doesnt stop the cmake from building it correctly but this inheritance is a problem as it adds include directories to wrong versions of headers in public libs (due to bugs in different versions, affecting different platforms,... the unification is impossible), the flags are used on wrong places etc. Is there a way to workaround it? Thank you. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] add_subdirectory inheritance
Frankly, I don't entirely understand what the problem is, or what your proposed solution is. What is it that you don't want the subdirectory context to inherit? On Tue, Apr 17, 2012 at 10:30 AM, irukandji wrote: > Hi, > > (as no one answered to my previous email, let me add this: multiplatform > project with few million lines > of code, sheer size of the project is not allowing to turn around whole > directory tree as price / performance > is a very relevant factor and even rewriting makefiles/vcprojs to cmake will > take months) > > The add_subdirectory inheritance striked which is practically a show > stopper, it was already discussed here > http://www.mail-archive.com/cmake@cmake.org/msg34291.html What was proposed > (DONT_INHERIT) was a great idea > and improvement to versability of CMake and also harmless for backward > compatibility so i dont really > understand why forcing subproject to inherit all the settings. > > Yes, what is added with add_subdirectory is not a child but a sibling or > even some other part of the tree > but the point is that it doesnt stop the cmake from building it correctly > but this inheritance is a problem > as it adds include directories to wrong versions of headers in public libs > (due to bugs in different versions, > affecting different platforms,... the unification is impossible), the flags > are used on wrong places etc. > > Is there a way to workaround it? > > Thank you. > > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] How to find MinGW static library in Windows?
Hi All! I have some MinGW static libraries and I need to use them in VS2008 project which is generated by CMake. if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} lib) set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" ${CMAKE_FIND_LIBRARY_SUFFIXES}) find_library(libatlas NAME atlas HINTS ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_SYSTEM_NAME}/atlas/x86sse2/lib DOC "Atlas libraries" ) target_link_libraries(${lib_name} ${libatlas} ) But CMake adds .lib at the end of the library name. This is not what I expect. WBR, Vyacheslav. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to debug a CMake script?
AFAIK, there is no interactive debugger for CMake scripts. You are doing exactly what I do. I use the message() command frequently to output variable values and test code flow. It's really the only way, unfortunately. On Sun, Apr 15, 2012 at 11:04 AM, Christoph Grüninger < christoph.gruenin...@iws.uni-stuttgart.de> wrote: > Hi CMake, > how do you debug CMake scripts? I know -Wdev, --debug-output, > and --trace but often they are not sufficient. If I am > interested in the value of a variable or want to check why a > test fails I have no clue what to do. Currently, I work with > printf debugging, a technique from the middle age of computer > programming. > Does a special mode or program exist to help me with debugging? > How do you do your debugging? > > Thanks in advance, > Christoph > > -- > My new computer came with Windows 7. > Windows 7 is much more user-friendly than Windows Vista. > I don't like that. [Sheldon, S03E13] > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake > -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CCTray like tool for CDash?
On Monday 16 April 2012, NoRulez wrote: > Hello, > > is there a tool for CDash which is equivalent to CCTray for Cruise Control > or is such tool planned? what is CCTray ? Alex -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CCTray like tool for CDash?
2012/4/17 Alexander Neundorf : > On Monday 16 April 2012, NoRulez wrote: >> Hello, >> >> is there a tool for CDash which is equivalent to CCTray for Cruise Control >> or is such tool planned? > > what is CCTray ? seems to be a notification application for continuous integration system: http://ccnet.sourceforge.net/CCNET/CCTray.html -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] CMake 2.8.8 is coming soon
Hi all, We plan to build and upload the CMake 2.8.8 release this week, and have scheduled a short webinar about the features in the new release for next Tuesday, April 24, 2012 at 1:15 pm Eastern time. Register for it here if you're interested: https://www3.gotomeeting.com/register/847839390 Thanks, David Cole Kitware, Inc. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] add_subdirectory inheritance
Oh, hi :) Well, the add_subdirectory takes all the preprocessor defines and include/library paths defined before calling it into the added "subdirectory" cmakelists.txt. If cmakelists.txt A defines -DWhatever and calls add_subdirectory(/B) where the cmakelists.txt for building library B resides then the library B is going to be built with -DWhatever. This is probably great behaviour for some cases but can also be undesired: in my case, each library has its own description file, residing in same directory as its cmakelists.txt, with only one function, which is included and called with few parameters to specify runtime etc. by each binary which has a dependancy to library. The description file function sets the -I to itself for caller, the -l to its output and, if the output file is not found, also calls add_subdirectory on its own directory. This is a perfect situation for developers as we can just do out of source configuration for whatever directory (where project resides) and only the dependancy tree for that particular binary is built. It also brings additional benefit that the team which takes care about specific library also takes care for description file and needed defines which splits the ownership of projects and also presents a single point of inclusion for that particular library, meaning only one file has to be changed for library specializations. For the nightly builds, only executables are added to the build while everything else is built only if actually used. It works great, but the add_subdirectory is propagating the settings from executable to dependant libraries and messes the build. The question actually is: can i workaround this behaviour and if not, can you please include the parameter to add_subdirectory function to NOT propagate the settings. Regards, Irukandji On 2012-04-17 17:58, Kent Williams wrote: Frankly, I don't entirely understand what the problem is, or what your proposed solution is. What is it that you don't want the subdirectory context to inherit? On Tue, Apr 17, 2012 at 10:30 AM, irukandji wrote: Hi, (as no one answered to my previous email, let me add this: multiplatform project with few million lines of code, sheer size of the project is not allowing to turn around whole directory tree as price / performance is a very relevant factor and even rewriting makefiles/vcprojs to cmake will take months) The add_subdirectory inheritance striked which is practically a show stopper, it was already discussed here http://www.mail-archive.com/cmake@cmake.org/msg34291.html What was proposed (DONT_INHERIT) was a great idea and improvement to versability of CMake and also harmless for backward compatibility so i dont really understand why forcing subproject to inherit all the settings. Yes, what is added with add_subdirectory is not a child but a sibling or even some other part of the tree but the point is that it doesnt stop the cmake from building it correctly but this inheritance is a problem as it adds include directories to wrong versions of headers in public libs (due to bugs in different versions, affecting different platforms,... the unification is impossible), the flags are used on wrong places etc. Is there a way to workaround it? Thank you. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] add_subdirectory inheritance
I think then that you shouldn't use add_subdirectory. I'd suggest using the ExternalProject module in this case, because it uncouples the subdirectory's project from the parent project. In that case, each subdirectory can be its own project and maintain private configurations. You can manage dependencies between ExternalProjects with the DEPENDS keyword. I think that what you're describing doesn't really make any sense to me. I don't know how you'd ever maintain a sane overall project if it depends on each subdirectory having conflicting compiler flags. Another way you can manage this sort of thing is to use Source file properties -- see SET_SOURCE_FILE_PROPERTIES in the CMake documentation and the "Properties on Source Files" section as well. On Tue, Apr 17, 2012 at 1:27 PM, irukandji wrote: > Oh, hi :) > > Well, the add_subdirectory takes all the preprocessor defines and > include/library > paths defined before calling it into the added "subdirectory" > cmakelists.txt. > > If cmakelists.txt A defines -DWhatever and calls add_subdirectory(/B) where > the > cmakelists.txt for building library B resides then the library B is going to > be > built with -DWhatever. This is probably great behaviour for some cases but > can > also be undesired: > in my case, each library has its own description file, residing in same > directory > as its cmakelists.txt, with only one function, which is included and called > with few > parameters to specify runtime etc. by each binary which has a dependancy to > library. > The description file function sets the -I to itself for caller, the -l to > its output > and, if the output file is not found, also calls add_subdirectory on its own > directory. > > This is a perfect situation for developers as we can just do out of source > configuration > for whatever directory (where project resides) and only the dependancy tree > for that > particular binary is built. > > It also brings additional benefit that the team which takes care about > specific > library also takes care for description file and needed defines which splits > the > ownership of projects and also presents a single point of inclusion for that > particular > library, meaning only one file has to be changed for library > specializations. > > For the nightly builds, only executables are added to the build while > everything > else is built only if actually used. > > It works great, but the add_subdirectory is propagating the settings from > executable > to dependant libraries and messes the build. > > The question actually is: can i workaround this behaviour and if not, can > you please > include the parameter to add_subdirectory function to NOT propagate the > settings. > > Regards, > Irukandji > > > On 2012-04-17 17:58, Kent Williams wrote: >> >> Frankly, I don't entirely understand what the problem is, or what your >> proposed solution is. >> >> What is it that you don't want the subdirectory context to inherit? >> >> On Tue, Apr 17, 2012 at 10:30 AM, irukandji wrote: >>> >>> Hi, >>> >>> (as no one answered to my previous email, let me add this: multiplatform >>> project with few million lines >>> of code, sheer size of the project is not allowing to turn around whole >>> directory tree as price / performance >>> is a very relevant factor and even rewriting makefiles/vcprojs to cmake >>> will >>> take months) >>> >>> The add_subdirectory inheritance striked which is practically a show >>> stopper, it was already discussed here >>> http://www.mail-archive.com/cmake@cmake.org/msg34291.html What was >>> proposed >>> (DONT_INHERIT) was a great idea >>> and improvement to versability of CMake and also harmless for backward >>> compatibility so i dont really >>> understand why forcing subproject to inherit all the settings. >>> >>> Yes, what is added with add_subdirectory is not a child but a sibling or >>> even some other part of the tree >>> but the point is that it doesnt stop the cmake from building it correctly >>> but this inheritance is a problem >>> as it adds include directories to wrong versions of headers in public >>> libs >>> (due to bugs in different versions, >>> affecting different platforms,... the unification is impossible), the >>> flags >>> are used on wrong places etc. >>> >>> Is there a way to workaround it? >>> >>> Thank you. >>> >>> -- >>> >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the CMake FAQ at: >>> http://www.cmake.org/Wiki/CMake_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.cmake.org/mailman/listinfo/cmake > > > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/lis
[CMake] Using two sets of compiler flags in same build
Hi all, I've posted this issue on StackOverflow[1] and have not yet received a suitable response, so I thought I'd ask here instead. Basically, I need to have a single build that uses two sets of compiler flags. One set is used to build native windows applications, and the other to build a managed (C++.net) application. It is my understanding that CMake kind of goes out of its way so that compiler flags are uniform throughout the project because this is usually the Right Thing(TM) -- actually, this is one of the reasons I like CMake. How can I create a CMake build script so that I have a subset of targets that build using a specific set of compiler flags, and another subset of targets that build with another set of compiler flags? Please keep in mind that I can't "switch" between either set of flags like I would for debug and release modes because I'm always building all the targets. I currently have this little helper macro (I understand why this is wrong, see below): # Compile managed (.NET) program. macro(add_managed_executable target) # Enable managed C++ extensions. if(NOT ${CMAKE_CXX_FLAGS} MATCHES "/clr") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /clr") endif() # Remove incompatible settings. if(${CMAKE_CXX_FLAGS_DEBUG} MATCHES "/RTC") string(REGEX REPLACE "/RTC(.+)" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" ) endif() if(${CMAKE_CXX_FLAGS_DEBUG} MATCHES "/MT") string(REGEX REPLACE "/MT(.+)" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" ) endif() if(${CMAKE_CXX_FLAGS_DEBUG} MATCHES "/MD") string(REGEX REPLACE "/MD(.+)" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" ) endif() # Add target. add_executable(${target} WIN32 ${ARGN}) endmacro() However, as expected, this completely screws up my build because changing CMAKE_CXX_FLAGS* affects the other targets, not only the one specified in the add_executable() call inside the macro. Thanks, André [1]: http://stackoverflow.com/q/10167175/313063 -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake 2.8.8-RC2 with Mac OS X 10.7.3 Xcode 4.3.2
After beating my head against this brick wall for over a week I'm becoming convinced that the problem is neither with CMake nor with Boost. If I build the project as a Unix project or as a Visual Studio/nmake project, the created projects build fine whether it is for Linux, Darwin, or Windows. However, if I use CMake to build an Xcode project, then Xcode can NEVER find the boost header files that are located at "/usr/include/boost/...". The real kick in the head is if I use Xcode's project editing capabilities to add "/usr/include" to HEADER_SEARCH_PATHS it still cannot find the header files. If I then edit my header file from "" to " I've been porting a disk diagnostic tool we develop and use internally to > the Mac platform specified in the Subject. I have it to the point where using > CMake 2.8.7 it would create the plethora of sub-project builds, build and > link all of the dylibs that are used by Wish to run the diagnostics on the > drives that we manufacture. Recently however, I realized I needed a better > IDE than "vim", so I tried to run CMake to use Xcode 4.3.2. The first thing > that happened was a CMake error which should be solved in CMake 2.8.8 RC1. It > was, and CMake created the plethora of projects as well as the single > xcodeproj file that ties them all together. > > The project loads in Xcode, and does the builds, with quite a few warnings. > The warnings are nothing new, and like many shops we tend to ignore them … > not my choice since I'm a bit anal about fixing warnings, but I have to live > with these. However, I am not generating any dylibs, and when I go to a > terminal and run "xcodebuild -project MyP.xcodeproj" I find that the build is > actually failing with an error -- a Boost header file is not found. > > The path for the Boost headers are defined in the first CMakeLists.txt for > non Windows platforms as: include_directories("/usr/include"). An additional > include_directores adds the remaining paths and those are defined. > > I've listed the files in that path and show boost defined under include > followed by all the header files that Xcode cannot find. My next thought was > to go look at HEADER_SEARCH_PATHS, and sure enough "/usr/include" is not > listed in that search path. I tried setting include_directores the > CMakeLists.txt file governs the actual project that is being built but that > does not work either. So, how do I set the search paths to find the Boost > header files? > > Also … How do I change build types in 2.8.8 RC2? The > -DCMAKE_BUILD_TYPE=Release that I used to use is no longer accepted. it fails > with a label not used message. > > Do I need to file a bug report, or am I doing or not doing something? > > Gary Little > H (952) 223-1349 > C (952) 454-4629 > gglit...@comcast.net > > > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] add_subdirectory inheritance
I don't know how you'd ever maintain a sane overall project if it depends on each subdirectory having conflicting compiler flags. Well here is the fun, there is not something like "you", we are taling about over 100 developers and if everyone is handling his own garden, this is not a problem. I cant tell you the details (the lawyers stuff) but believe me it is as sane as it can be in regards of doing insane things :) I'll check your suggestions tomorrow, thank you. Regards, irukandji On 2012-04-17 20:54, Kent Williams wrote: I think then that you shouldn't use add_subdirectory. I'd suggest using the ExternalProject module in this case, because it uncouples the subdirectory's project from the parent project. In that case, each subdirectory can be its own project and maintain private configurations. You can manage dependencies between ExternalProjects with the DEPENDS keyword. I think that what you're describing doesn't really make any sense to me. I don't know how you'd ever maintain a sane overall project if it depends on each subdirectory having conflicting compiler flags. Another way you can manage this sort of thing is to use Source file properties -- see SET_SOURCE_FILE_PROPERTIES in the CMake documentation and the "Properties on Source Files" section as well. On Tue, Apr 17, 2012 at 1:27 PM, irukandji wrote: Oh, hi :) Well, the add_subdirectory takes all the preprocessor defines and include/library paths defined before calling it into the added "subdirectory" cmakelists.txt. If cmakelists.txt A defines -DWhatever and calls add_subdirectory(/B) where the cmakelists.txt for building library B resides then the library B is going to be built with -DWhatever. This is probably great behaviour for some cases but can also be undesired: in my case, each library has its own description file, residing in same directory as its cmakelists.txt, with only one function, which is included and called with few parameters to specify runtime etc. by each binary which has a dependancy to library. The description file function sets the -I to itself for caller, the -l to its output and, if the output file is not found, also calls add_subdirectory on its own directory. This is a perfect situation for developers as we can just do out of source configuration for whatever directory (where project resides) and only the dependancy tree for that particular binary is built. It also brings additional benefit that the team which takes care about specific library also takes care for description file and needed defines which splits the ownership of projects and also presents a single point of inclusion for that particular library, meaning only one file has to be changed for library specializations. For the nightly builds, only executables are added to the build while everything else is built only if actually used. It works great, but the add_subdirectory is propagating the settings from executable to dependant libraries and messes the build. The question actually is: can i workaround this behaviour and if not, can you please include the parameter to add_subdirectory function to NOT propagate the settings. Regards, Irukandji On 2012-04-17 17:58, Kent Williams wrote: Frankly, I don't entirely understand what the problem is, or what your proposed solution is. What is it that you don't want the subdirectory context to inherit? On Tue, Apr 17, 2012 at 10:30 AM, irukandji wrote: Hi, (as no one answered to my previous email, let me add this: multiplatform project with few million lines of code, sheer size of the project is not allowing to turn around whole directory tree as price / performance is a very relevant factor and even rewriting makefiles/vcprojs to cmake will take months) The add_subdirectory inheritance striked which is practically a show stopper, it was already discussed here http://www.mail-archive.com/cmake@cmake.org/msg34291.html What was proposed (DONT_INHERIT) was a great idea and improvement to versability of CMake and also harmless for backward compatibility so i dont really understand why forcing subproject to inherit all the settings. Yes, what is added with add_subdirectory is not a child but a sibling or even some other part of the tree but the point is that it doesnt stop the cmake from building it correctly but this inheritance is a problem as it adds include directories to wrong versions of headers in public libs (due to bugs in different versions, affecting different platforms,... the unification is impossible), the flags are used on wrong places etc. Is there a way to workaround it? Thank you. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by
[CMake] CMake Ninja generator issues: any showstoppers?
Hello CMake Ninja fans, We are going to be creating the CMake 2.8.8 final release tomorrow. However, there are issues reported for the ninja generator. Does anybody consider them "showstoppers" ?? (I do not, but want a sanity check from the community -- we will get bug fixes into master and available for the next release as soon as the fixes are available. But these issues will be in the 2.8.8 release, and not fixed until the next release at this point.) The following issues are reported against the Ninja generator: This one just came in yesterday: http://public.kitware.com/Bug/view.php?id=13139 The remaining ones have been in there for a couple weeks: http://public.kitware.com/Bug/view.php?id=13067 http://public.kitware.com/Bug/view.php?id=13069 http://public.kitware.com/Bug/view.php?id=13073 http://public.kitware.com/Bug/view.php?id=13105 Any thoughts or comments? Feel free to make them in the individual bug entries as makes sense. Thanks, David -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake 2.8.8-RC2 with Mac OS X 10.7.3 Xcode 4.3.2
You may want to take a very detailed look at the command line arguments that Xcode is passing to the compiler. There you can pick apart all the include paths that are being passed to the compiler and you will probably find that /usr/include/boost is missing. Why it is missing is still unknown but at least you would know that the CMake generated Xcode project is flawed. -- Mike Jackson On Apr 17, 2012, at 4:47 PM, Gary Little wrote: > After beating my head against this brick wall for over a week I'm becoming > convinced that the problem is neither with CMake nor with Boost. If I build > the project as a Unix project or as a Visual Studio/nmake project, the > created projects build fine whether it is for Linux, Darwin, or Windows. > However, if I use CMake to build an Xcode project, then Xcode can NEVER find > the boost header files that are located at "/usr/include/boost/...". The real > kick in the head is if I use Xcode's project editing capabilities to add > "/usr/include" to HEADER_SEARCH_PATHS it still cannot find the header files. > If I then edit my header file from "" to > " but then fails because that header include another file using " > I dunno … I guess I was expecting Xcode to work as well as Visual Studio. It > doesn't. > > Gary Little > H (952) 223-1349 > C (952) 454-4629 > gglit...@comcast.net > > > On Apr 12, 2012, at 12:34 PM, Gary Little wrote: > >> I've been porting a disk diagnostic tool we develop and use internally to >> the Mac platform specified in the Subject. I have it to the point where >> using CMake 2.8.7 it would create the plethora of sub-project builds, build >> and link all of the dylibs that are used by Wish to run the diagnostics on >> the drives that we manufacture. Recently however, I realized I needed a >> better IDE than "vim", so I tried to run CMake to use Xcode 4.3.2. The first >> thing that happened was a CMake error which should be solved in CMake 2.8.8 >> RC1. It was, and CMake created the plethora of projects as well as the >> single xcodeproj file that ties them all together. >> >> The project loads in Xcode, and does the builds, with quite a few warnings. >> The warnings are nothing new, and like many shops we tend to ignore them … >> not my choice since I'm a bit anal about fixing warnings, but I have to live >> with these. However, I am not generating any dylibs, and when I go to a >> terminal and run "xcodebuild -project MyP.xcodeproj" I find that the build >> is actually failing with an error -- a Boost header file is not found. >> >> The path for the Boost headers are defined in the first CMakeLists.txt for >> non Windows platforms as: include_directories("/usr/include"). An additional >> include_directores adds the remaining paths and those are defined. >> >> I've listed the files in that path and show boost defined under include >> followed by all the header files that Xcode cannot find. My next thought was >> to go look at HEADER_SEARCH_PATHS, and sure enough "/usr/include" is not >> listed in that search path. I tried setting include_directores the >> CMakeLists.txt file governs the actual project that is being built but that >> does not work either. So, how do I set the search paths to find the Boost >> header files? >> >> Also … How do I change build types in 2.8.8 RC2? The >> -DCMAKE_BUILD_TYPE=Release that I used to use is no longer accepted. it >> fails with a label not used message. >> >> Do I need to file a bug report, or am I doing or not doing something? >> >> Gary Little >> H (952) 223-1349 >> C (952) 454-4629 >> gglit...@comcast.net >> >> >> -- >> >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the CMake FAQ at: >> http://www.cmake.org/Wiki/CMake_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.cmake.org/mailman/listinfo/cmake > > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] add_subdirectory inheritance
Hi, Maybe i can try to reexplain, from head, ignore syntactic errors and oversimplifying... ** /sources/cmakelist.txt /sources/binaries/helloworld ..cmakelists.txt /sources/binaries/hellocmake ..cmakelists.txt /sources/libraries/stdio ..cmakelists.txt ..description.txt /sources/libraries/gfx ..cmakelists.txt ..description.txt ** helloworld: << project(helloworld) include("${libs}/stdio/description.txt") include("${libs}/network/description.txt") file(glob da_files "*.*") add_executable( helloworld da_files ) helper_add_stdio() ** stdio description << function (helper_add_stdio) include_directory( "${sources}/libraries/stdio" ) target_add_library( ${CMAKE_PROJECT_NAME} "${BINDIR}/whatever/stdio.lib" ) add_definition( -DUSING_STDIO ) ... execute(grab_me_a_beer_and_add_some_more_flags) ... if(not exists "${BINDIR}/whatever/stdio.lib") add_subdirectory( "/sources/libraries/stdio") endif() endfunction() ** hellocmake << project(hellocmake) include("${libs}/gfx/description.txt") include("${libs}/network/description.txt") file(glob da_files "*.*") add_executable( hellocmake da_files ) helper_add_gfx() helper_add_stdio() ** gfx description << function (helper_add_gfx) include_directory( "${sources}/libraries/gfx" ) target_add_library( ${CMAKE_PROJECT_NAME} "${BINDIR}/whatever/gfx.lib" ) add_definition( -DUSING_GFX ) ... if(not exists "${BINDIR}/whatever/gfx.lib") add_subdirectory( "${sources}/libraries/gfx" "${BINDIR}/whatever/gfx.lib" ) endif() endfunction() ** sources/cmakelist.txt << add_subdirectory( "/sources/binaries/helloworld" ) add_subdirectory( "/sources/binaries/hellocmake" ) ** * If i run cmake on helloworld, lets say for windows, i get solution and vcprojs of helloworld with dependancy to generated vcproj for stdio. Stand alone. * If i run cmake on hellocmake, lets say for windows, i get solution and vcprojs of hellocmake with dependancy to generated vcproj for stdio and gfx. Stand alone. * If i run cmake on /sources/cmakelist.txt i get full build. * The author(s) of helloworld doesnt need to have a clue about stdio library its paths or whatever as the author(s) of stdio/description.txt has prepared everything for him (in a perfect world :) ). Same goes for hellocmake. * The full build doesnt need to understand what is behind the helloworld and hellocmake as they both will take care about building the dependancies on their own. * The coupling is minimized. * The description.txt can serve as a hook in case of changing whatever settings for the libraries (from renaming them, to changing directory tree, changing compiler flags etc) This is what i would like to achieve. But if you look at >> hellocmake <<, the stdio cmakelists will inherit the include path from gfx library which you really dont want. It will also inherit -DUSING_GFX even if it has nothing to do with it. Regards, irukandji On 2012-04-17 22:56, irukandji wrote: I don't know how you'd ever maintain a sane overall project if it depends on each subdirectory having conflicting compiler flags. Well here is the fun, there is not something like "you", we are taling about over 100 developers and if everyone is handling his own garden, this is not a problem. I cant tell you the details (the lawyers stuff) but believe me it is as sane as it can be in regards of doing insane things :) I'll check your suggestions tomorrow, thank you. Regards, irukandji On 2012-04-17 20:54, Kent Williams wrote: I think then that you shouldn't use add_subdirectory. I'd suggest using the ExternalProject module in this case, because it uncouples the subdirectory's project from the parent project. In that case, each subdirectory can be its own project and maintain private configurations. You can manage dependencies between ExternalProjects with the DEPENDS keyword. I think that what you're describing doesn't really make any sense to me. I don't know how you'd ever maintain a sane overall project if it depends on each subdirectory having conflicting compiler flags. Another way you can manage this sort of thing is to use Source file properties -- see SET_SOURCE_FILE_PROPERTIES in the CMake documentation and the "Properties on Source Files" section as well. On Tue, Apr 17, 2012 at 1:27 PM, irukandji wrote: Oh, hi :) Well, the add_subdirectory takes all the preprocessor defines and include/library paths defined before calling it into the added "subdirectory" cmakelists.txt. If cmakelists.txt A defines -DWhatever and calls add_subdirectory(/B) where the cmakelists.txt for building library B resides then the library B is going to be built with -DWhatever. This is probably great b
Re: [CMake] CMake Ninja generator issues: any showstoppers?
On Tue, Apr 17, 2012 at 4:59 PM, David Cole wrote: > Hello CMake Ninja fans, > > We are going to be creating the CMake 2.8.8 final release tomorrow. However, > there are issues reported for the ninja generator. Does anybody consider > them "showstoppers" ?? David, Does the latest CMake 2.8.8 source tree have this fix? http://www.cmake.org/pipermail/cmake/2012-April/049772.html Even if it's not the ideal fix, I just tested it and it does seem to address one of the ninja clean target issues I was seeing. Not really a show-stopper (definitely not worth another RC, if that's what would be involved) but would be a nice-to-have. CY P.S. - Is it expected that Ninja respect the ADDITIONAL_MAKE_CLEAN_FILES property, or is there a separate property for each generator? If the latter, is there some "common" property that can be used to have all generators' clean rules remove the files? -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] CMake Ninja generator issues: any showstoppers?
13069 looks reasonably serious, but I won't consider it a show-stopper. It's relatively easy to work around. -- Best regards, Alexander. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] CMake 2.8.8-RC2 with Mac OS X 10.7.3 Xcode 4.3.2
You read my mind Michael. When I run Xcodebuild on the project and then look at the arguments passed for the compile of the failing file, there is never a "-I /user/include" switch in the command line. In Windows I'd be setting it in either the INCLUDE environment variable, or setting the include directories in Visual Studio for either the project or the file. I've got 40 years in the industry so looking at a bunch of output from a build is nothing new for me. Thanks for the help, but right now I do not believe this is a CMake issue. Gary Little H (952) 223-1349 C (952) 454-4629 gglit...@comcast.net On Apr 17, 2012, at 4:00 PM, Michael Jackson wrote: > You may want to take a very detailed look at the command line arguments that > Xcode is passing to the compiler. There you can pick apart all the include > paths that are being passed to the compiler and you will probably find that > /usr/include/boost is missing. Why it is missing is still unknown but at > least you would know that the CMake generated Xcode project is flawed. > -- > Mike Jackson > > On Apr 17, 2012, at 4:47 PM, Gary Little wrote: > >> After beating my head against this brick wall for over a week I'm becoming >> convinced that the problem is neither with CMake nor with Boost. If I build >> the project as a Unix project or as a Visual Studio/nmake project, the >> created projects build fine whether it is for Linux, Darwin, or Windows. >> However, if I use CMake to build an Xcode project, then Xcode can NEVER find >> the boost header files that are located at "/usr/include/boost/...". The >> real kick in the head is if I use Xcode's project editing capabilities to >> add "/usr/include" to HEADER_SEARCH_PATHS it still cannot find the header >> files. If I then edit my header file from "" >> to "> file but then fails because that header include another file using >> "> >> I dunno … I guess I was expecting Xcode to work as well as Visual Studio. It >> doesn't. >> >> Gary Little >> H (952) 223-1349 >> C (952) 454-4629 >> gglit...@comcast.net >> >> >> On Apr 12, 2012, at 12:34 PM, Gary Little wrote: >> >>> I've been porting a disk diagnostic tool we develop and use internally to >>> the Mac platform specified in the Subject. I have it to the point where >>> using CMake 2.8.7 it would create the plethora of sub-project builds, build >>> and link all of the dylibs that are used by Wish to run the diagnostics on >>> the drives that we manufacture. Recently however, I realized I needed a >>> better IDE than "vim", so I tried to run CMake to use Xcode 4.3.2. The >>> first thing that happened was a CMake error which should be solved in CMake >>> 2.8.8 RC1. It was, and CMake created the plethora of projects as well as >>> the single xcodeproj file that ties them all together. >>> >>> The project loads in Xcode, and does the builds, with quite a few warnings. >>> The warnings are nothing new, and like many shops we tend to ignore them … >>> not my choice since I'm a bit anal about fixing warnings, but I have to >>> live with these. However, I am not generating any dylibs, and when I go to >>> a terminal and run "xcodebuild -project MyP.xcodeproj" I find that the >>> build is actually failing with an error -- a Boost header file is not found. >>> >>> The path for the Boost headers are defined in the first CMakeLists.txt for >>> non Windows platforms as: include_directories("/usr/include"). An >>> additional include_directores adds the remaining paths and those are >>> defined. >>> >>> I've listed the files in that path and show boost defined under include >>> followed by all the header files that Xcode cannot find. My next thought >>> was to go look at HEADER_SEARCH_PATHS, and sure enough "/usr/include" is >>> not listed in that search path. I tried setting include_directores the >>> CMakeLists.txt file governs the actual project that is being built but that >>> does not work either. So, how do I set the search paths to find the Boost >>> header files? >>> >>> Also … How do I change build types in 2.8.8 RC2? The >>> -DCMAKE_BUILD_TYPE=Release that I used to use is no longer accepted. it >>> fails with a label not used message. >>> >>> Do I need to file a bug report, or am I doing or not doing something? >>> >>> Gary Little >>> H (952) 223-1349 >>> C (952) 454-4629 >>> gglit...@comcast.net >>> >>> >>> -- >>> >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the CMake FAQ at: >>> http://www.cmake.org/Wiki/CMake_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.cmake.org/mailman/listinfo/cmake >> >> -- >> >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the CMake FAQ at: >> http://www.cmake.org/Wiki/C
Re: [CMake] CCTray like tool for CDash?
Yes, it is a notification client for cruise control to get information from the build server without opening a web browser every time. You could also manage projects on the build server. It is a small app which runs as a system tray to show the status of the builds. Best Regards NoRulez Am 17.04.2012 um 19:49 schrieb Eric Noulard : > 2012/4/17 Alexander Neundorf : >> On Monday 16 April 2012, NoRulez wrote: >>> Hello, >>> >>> is there a tool for CDash which is equivalent to CCTray for Cruise Control >>> or is such tool planned? >> >> what is CCTray ? > > seems to be a notification application for continuous integration system: > http://ccnet.sourceforge.net/CCNET/CCTray.html > > > -- > Erk > Le gouvernement représentatif n'est pas la démocratie -- > http://www.le-message.org > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake