[CMake] Using -DOPTION="something=moof" mangles the OPTION value to "something:UNINITIALIZED=moof"
I discovered this behavior on my ubuntu 11.04 amd64 workstation with cmake 2.8.3 when trying to set an -march= option for gcc: cmake -DCMAKE_C_FLAGS="-Os -march=native -flto -freorder-blocks-and-partition" was mangled to be CMAKE_C_FLAGS=-Os -march:UNINITIALIZED=native -flto -freorder-blocks-and-partition in the CMakeCache.txt. I haven't had much luck with the search engine of my choice finding anything on the issue. ___ 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] Using -DOPTION="something=moof" mangles the OPTION value to "something:UNINITIALIZED=moof"
Turns out, using the "verbose" form of the option definition -DOPTION:TYPE=... does not exhibit the issue. On 8/29/11, Marcus Fritzsch wrote: > I discovered this behavior on my ubuntu 11.04 amd64 workstation with > cmake 2.8.3 when trying to set an -march= option for gcc: > > cmake -DCMAKE_C_FLAGS="-Os -march=native -flto > -freorder-blocks-and-partition" > > was mangled to be > > CMAKE_C_FLAGS=-Os -march:UNINITIALIZED=native -flto > -freorder-blocks-and-partition > > in the CMakeCache.txt. > > I haven't had much luck with the search engine of my choice finding > anything on the issue. > ___ 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] OpenCL Module?
Does anyone have an "FindOpenCL.cmake" file that they would like to share? ___ Mike Jackson www.bluequartz.net Principal Software Engineer mike.jack...@bluequartz.net BlueQuartz Software Dayton, Ohio ___ 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] OpenCL Module?
On Mon 29 Aug 2011 03:44:55 PM CEST, Michael Jackson wrote: > Does anyone have an "FindOpenCL.cmake" file that they would like to share? > ___ > Mike Jackson www.bluequartz.net > Principal Software Engineer mike.jack...@bluequartz.net > BlueQuartz Software Dayton, Ohio > > ___ > 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 Very simplistic, haven't tried it with all possible SDK's on all possible platforms (namely I only tried it on Ubuntu with nvidia-current-dev). In particular I'm not very happy with the PATH_SUFFIXES in the find_library, as this should probably be tailored to CMAKE_SIZEOF_VOID_P. # - Find the OpenCL headers and library # # Defines the following if found: # OPENCL_FOUND: TRUE if found, FALSE otherwise # OPENCL_INCLUDE_DIRS : Include directories for OpenCL # OPENCL_LIBRARIES: The libraries to link against # # The user can set the OPENCLROOT environment variable to help finding OpenCL # if it is installed in a non-standard place. set(CMAKE_FIND_FRAMEWORK FIRST) find_path(OPENCL_INCLUDE_DIR NAMES OpenCL/cl.h CL/cl.h PATHS ENV OPENCLROOT PATH_SUFFIXES include include/nvidia-current) find_library(OPENCL_LIBRARY OpenCL PATHS ENV OPENCLROOT PATH_SUFFIXES lib/x86_64 lib/x64 lib/x86) mark_as_advanced(OPENCL_INCLUDE_DIR OPENCL_LIBRARY) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(OpenCL OPENCL_INCLUDE_DIR OPENCL_LIBRARY) set(OPENCL_INCLUDE_DIRS "${OPENCL_INCLUDE_DIR}") set(OPENCL_LIBRARIES "${OPENCL_LIBRARY}") #- EOF HTH Michael ___ 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] FindQt4 fails to find QtUiTools in windows cross-environment
On Friday, August 26, 2011 10:54:44 am Dominik Schmidt wrote: > Hey! > > I'm facing an issue with FindQt4 module when cross-compiling from Linux > to Windows. The QtUiTools are not found on the first run of cmake, > executing cmake a second time finds it (I attached the diff of > CMakeCache.txt before and after the second cmake run). > > I suspect the issue is connected to this QTBUG: > https://bugreports.qt.nokia.com/browse/QTBUG-20498 > > The description is only half-true, it's built here, but as a static > library in contrast to the rest of Qt which is built as dynamic ones. > A fix for this has been put in. http://www.cmake.org/gitweb?p=cmake.git;a=commit;h=a67be31 -- Clinton Stimpson Elemental Technologies, Inc Computational Simulation Software, LLC www.csimsoft.com ___ 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] Using -DOPTION="something=moof" mangles the OPTION value to "something:UNINITIALIZED=moof"
On 08/29/2011 02:37 PM, Marcus Fritzsch wrote: > Turns out, using the "verbose" form of the option definition > -DOPTION:TYPE=... does not exhibit the issue. > > On 8/29/11, Marcus Fritzsch wrote: >> I discovered this behavior on my ubuntu 11.04 amd64 workstation with >> cmake 2.8.3 when trying to set an -march= option for gcc: >> >> cmake -DCMAKE_C_FLAGS="-Os -march=native -flto >> -freorder-blocks-and-partition" >> >> was mangled to be >> >> CMAKE_C_FLAGS=-Os -march:UNINITIALIZED=native -flto >> -freorder-blocks-and-partition >> >> in the CMakeCache.txt. >> >> I haven't had much luck with the search engine of my choice finding >> anything on the issue. With the following simple CMakeLists.txt, I can't confirm this issue: CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR) PROJECT(OPTIONS C) SET(CMAKE_VERBOSE_MAKEFILE ON) FILE(WRITE ${CMAKE_BINARY_DIR}/main.c "int main(void){return 0;}\n") ADD_EXECUTABLE(main main.c) > % cmake -DCMAKE_C_FLAGS="-Os -march=native -flto > -freorder-blocks-and-partition" ... > ... > % grep CMAKE_C_FLAGS:STRING CMakeCache.txt > CMAKE_C_FLAGS:STRING=-Os -march=native -flto -freorder-blocks-and-partition Could you try with this exemplary project and report the results, especially the exact command line? BTW, which shell do you use? Regards, Michael ___ 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] Working with MSVC10
Nope. It finds part of a list of required files. For example it finds stdarg.h but not stdlib.h. If I rename stdarg.h (in the same directory as stdlib.h) then it can't find stdarg.h (what you would expect). I'm about ready to give up. I've check all the permissions. It's a standard installation of Visual Studio 10 cmake finds a on file in the correct directory but not the next file. CHECK_REQUIRED_HEADERS ( stdarg.h stddef.h ctype.h stdlib.h stdio.h algorithm functional map vector list set math.h fcntl.h limits.h) calls #required headers MACRO(CHECK_REQUIRED_HEADERS COMPULSARY_HEADERS) FOREACH(func ${ARGV}) STRING(TOUPPER ${func} FUNC) STRING(REPLACE . _ FUNC ${FUNC}) CHECK_INCLUDE_FILE_CXX (${func} HAVE_${FUNC}) IF ( HAVE_${FUNC} ) SET(_CL_HAVE_${FUNC} ${FUNC}) ENDIF ( HAVE_${FUNC} ) IF ( NOT HAVE_${FUNC} ) MESSAGE ( FATAL_ERROR "${func} could not be found" ) ENDIF ( NOT HAVE_${FUNC} ) ENDFOREACH(func ${COMPULSARY_HEADERS}) ENDMACRO(CHECK_REQUIRED_HEADERS) Steve From: Kitware - Lisa Avila [mailto:kitw...@kitware.com] Sent: Monday, August 29, 2011 5:01 AM To: Steve Casselman Subject: Re: Working with MSVC10 Hopefully you've resolved your issue - I am sure it is something simple like a missing directory in your search path. Lisa On Thu, Aug 25, 2011 at 1:21 PM, Steve Casselman wrote: Sorry. Just a little frustrated. Thanks Steve From: Kitware - Lisa Avila [mailto:kitw...@kitware.com] Sent: Wednesday, August 24, 2011 9:24 PM To: Steve Casselman Subject: Re: Working with MSVC10 Hello Steve, We do have a mailing list for asking technical questions about CMake - I provided a link to that in the previous email I sent. This email address is not used for that purpose, and I am not a CMake expert able to answer your question. However, I can assure you that CMake does "work" - it is tested continuously and nightly on nearly 100 different system configurations (some of which are Windows platforms running Visual Studio 10). Note that both the CMake software and the mailing list are free. And since CMake is provided as open source, you are more than welcome to locate the "bug" (assuming it is a bug in CMake and not in your use of it). We do have a public Mantis bug tracker where you can enter your issue, and you can submit a patch with the fix for inclusion in CMake. If you require any further information on our support, training, or consulting options, please let me know and I'd be happy to assist you. Lisa -- Lisa S. Avila Vice President Kitware, Inc. 28 Corporate Drive Clifton Park, NY 12065 USA Direct: (518) 881-4903 Main Line: (518) 371-3971 (x504) lisa.av...@kitware.com On Wed, Aug 24, 2011 at 5:42 PM, Steve Casselman wrote: So It's funny that this stuff does not really work and you make your money off someone finding a bug. I get this Looking for C++ include stdarg.h - found Looking for C++ include stddef.h Looking for C++ include stddef.h - found Looking for C++ include ctype.h Looking for C++ include ctype.h - found Looking for C++ include stdlib.h Looking for C++ include stdlib.h - not found stdlib.h is in the same directory as everything else. Steve ___ 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_package with config file always set xyz_FOUND to true?
Hello, I am trying to use the following syntax: find_package (xyz REQUIRED xyz1 xyz2) using a config file, i.e. NOT Findxyz.cmake. I have a file named xyz-config.cmake that contains some code to check if the required components are available or not (based on how xyz was compiled). Ideally I would like the find_package command to set xyz_FOUND to false if: - xyz-config.cmake file is not found (that's working by default) OR - xyz-config.cmake file is found BUT one or more component is missing In my xyz-config.cmake, I tried: - set (xyz_FOUND FALSE) # overall package not found as required - set (xyz2_FOUND FALSE) # component not found, hoping find_package would compare this to the list xyz_FIND_COMPONENTS But in all cases, it seems that find_package resets xyz_FOUND to 1 as long as the file xyz-config.cmake is found. Is there a way to set xyz_FOUND to 0 within xyz-config.cmake? Anton ___ 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 can I know the target is 32-bit, or 64bit
Hi, In CMakeLists.txt, I want to know whether cmake has built-in mechanism that I can know the target is 32-bit, or 64bit ? Thanks, Dongsheng ___ 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 can I know the target is 32-bit, or 64bit
On Tue 30 Aug 2011 07:54:45 AM CEST, Dongsheng Song wrote: > Hi, > > In CMakeLists.txt, I want to know whether cmake has built-in mechanism that > I can know the target is 32-bit, or 64bit ? > > Thanks, > Dongsheng Look at the CMAKE_SIZEOF_VOID_P variable. However, normally this is better handled in the code through #ifdef's, because on some platforms (e.g. Mac) it is possible to compile for multiple architecture at once with a single compiler invocation. I.e., something like gcc -arch i386 -arch ppc -arch x86_64 -arch ppc64 hello.c will compile hello.c *four* times, first with __i386__ defined, then with __ppc__, followed by __x86_64__ and finally with __ppc64__. If you ever plan to support Mac OS X and allow your users to set the CMAKE_OSX_ARCHITECTURES variable to a list of architectures with varying bit-sex and pointer sizes, you should *not* rely on CMAKE_SIZEOF_VOID_P, since that will only contain the pointer size of the *first* architecture. HTH Michael ___ 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 can I know the target is 32-bit, or 64bit
at the moment I just set an option for linux, since I don't often have dual mode compilers... just set it in the config... msvc has CMAKE_CL_64 which can be tested to set options. On Mon, Aug 29, 2011 at 10:54 PM, Dongsheng Song wrote: > Hi, > > In CMakeLists.txt, I want to know whether cmake has built-in mechanism that > I can know the target is 32-bit, or 64bit ? > > Thanks, > Dongsheng > ___ > 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