[cmake-developers] target_automoc targets in VS2010 projects
Is it possible to hide the target_automoc targets when using the VS2010 generator? If it is not possible, it would be very useful if they could be put in a folder, ie set_property(GLOBAL PROPERTY USE_FOLDERS ON) set_property(GLOBAL PROPERTY AUTOMOC_FOLDER automoc) We tried putting the generated target_automoc targets in VS2010 folders manually like shown below, but it doesn't work. set_property(GLOBAL PROPERTY USE_FOLDERS ON) add_executable(my-target ) set_target_properties(my-target PROPERTIES AUTOMOC TRUE) set_property(TARGET my-target_automoc PROPERTY FOLDER automoc) Best regards, Thomas -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] Improvements to Qt4 macros
Hi, while wrestling with QtDBus today I found out the hard way (i.e. reading the source) that QT4_ADD_DBUS_INTERFACE is much more powerful than its documentation tells. To fix that the first patch now tells about the properties you may set on the input file. While at it I also added a reference from QT4_AUTOMOC macro to the new AUTOMOC property. The other 2 patches improve some things I found while reading the source code. Patch #2 uses get_filename_component to strip the path from the given input file (why implement something again that we already have?). It also applies string(TOLOWER) earlier so that an XML file with an upper or mixed case extension (FAT anyone?) will also be properly handled. Patch #3 finally wraps a lot of set(...) in quotes when the argument may contain spaces, e.g. CMAKE_CURRENT_BINARY_DIR. It also uses LIST(APPEND) to add to the list of source files instead of just using set(). Together with additional quotes this should make things much less likely to screw up things. If noone objects I'll merge this to next tonight. Running the testsuite locally did not show any errors. EikeFrom af7f8bd6bb23ef2e68fe53b16baae3f84f25b48d Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer e...@sf-mail.de Date: Wed, 20 Jun 2012 13:11:40 +0200 Subject: [PATCH 1/3] FindQt4: extend documentation -refer to AUTOMOC from QT4_AUTOMOC -mention how source file properties influence QT4_ADD_DBUS_INTERFACE --- Modules/FindQt4.cmake | 25 +++-- 1 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 391797e..2f1708d 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -102,15 +102,28 @@ #accompanying header file foo.h. #If a source file has the SKIP_AUTOMOC property set it will be ignored by this macro. # +#You should have a look on the AUTOMOC property for targets to achieve the same results. +# # macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename) -#create a the interface header and implementation files with the +#Create a the interface header and implementation files with the #given basename from the given interface xml file and add it to -#the list of sources +#the list of sources. +# +#You can pass additional parameters to the qdbusxml2cpp call by setting +#properties on the input file: +# +#INCLUDE the given file will be included in the generate interface header +# +#CLASSNAME the generated class is named accordingly +# +#NO_NAMESPACE the generated class is not wrapped in a namespace # # macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... ) -#create the interface header and implementation files -#for all listed interface xml files -#the name will be automatically determined from the name of the xml file +#Create the interface header and implementation files +#for all listed interface xml files. +#The basename will be automatically determined from the name of the xml file. +# +#The source file properties described for QT4_ADD_DBUS_INTERFACE also apply here. # # macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname]) #create a dbus adaptor (header and implementation file) from the xml file @@ -217,7 +230,7 @@ # QT_QAXCONTAINER_INCLUDE_DIR Path to include/ActiveQt (Windows only) # QT_QAXSERVER_INCLUDE_DIRPath to include/ActiveQt (Windows only) # QT_QTCORE_INCLUDE_DIR Path to include/QtCore -# QT_QTDBUS_INCLUDE_DIR Path to include/QtDBus +# QT_QTDBUS_INCLUDE_DIR Path to include/QtDBus # QT_QTDESIGNER_INCLUDE_DIR Path to include/QtDesigner # QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR Path to include/QtDesigner # QT_QTGUI_INCLUDE_DIRPath to include/QtGui -- 1.7.7.3 From 8929188877596d745e9cec4eec7ae337a5d8e3ca Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer e...@sf-mail.de Date: Wed, 20 Jun 2012 13:23:40 +0200 Subject: [PATCH 2/3] Qt4Macros: improve basename extraction in QT4_ADD_DBUS_INTERFACES -convert the filename to lowercase before the extraction, this allows this to work even if the filename as uppercase .XML extension -use get_filename_component(... NAME) to strip the path --- Modules/Qt4Macros.cmake |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index f867bc5..7170711 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -258,9 +258,10 @@ ENDMACRO(QT4_ADD_DBUS_INTERFACE) MACRO(QT4_ADD_DBUS_INTERFACES _sources) FOREACH (_current_FILE ${ARGN}) GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE) +GET_FILENAME_COMPONENT(_basename ${_current_FILE} NAME) # get the part before the .xml suffix -STRING(REGEX REPLACE (.*[/\\.])?([^\\.]+)\\.xml \\2 _basename ${_current_FILE}) STRING(TOLOWER
[cmake-developers] [CMake 0013323]: CMake crashes if language is set inproperly.
The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=13323 == Reported By:Mariusz Plucinski Assigned To: == Project:CMake Issue ID: 13323 Category: CMake Reproducibility:always Severity: minor Priority: normal Status: new == Date Submitted: 2012-06-20 08:02 EDT Last Modified: 2012-06-20 08:02 EDT == Summary:CMake crashes if language is set inproperly. Description: Found it during experimenting with adding new language support. CMake crashes when there is a problem with source file language property. Steps to Reproduce: 1. Create CMakeLists.txt and put the following code: project(BugTest) cmake_minimum_required(VERSION 2.8) add_executable(Foo Bar.asd) set_target_properties(Foo PROPERTIES LINKER_LANGUAGE asd) 2. Create empty Bar.asd file 3. Run cmake . under Windows, using Visual Studio 10 generator. Additional Information: Expected result: Getting an error message about missing variable: CMAKE_asd_LINK_EXECUTABLE Actual result: Application crash (Access violation). Attached patch fixes an error. == Issue History Date ModifiedUsername FieldChange == 2012-06-20 08:02 Mariusz PlucinskiNew Issue 2012-06-20 08:02 Mariusz PlucinskiFile Added: cmake_cmLocalGenerator.patch == -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] Improvements to Qt4 macros
On Jun 20, 2012, at 5:51 AM, Rolf Eike Beer wrote: Hi, while wrestling with QtDBus today I found out the hard way (i.e. reading the source) that QT4_ADD_DBUS_INTERFACE is much more powerful than its documentation tells. To fix that the first patch now tells about the properties you may set on the input file. While at it I also added a reference from QT4_AUTOMOC macro to the new AUTOMOC property. The other 2 patches improve some things I found while reading the source code. Patch #2 uses get_filename_component to strip the path from the given input file (why implement something again that we already have?). It also applies string(TOLOWER) earlier so that an XML file with an upper or mixed case extension (FAT anyone?) will also be properly handled. Patch #3 finally wraps a lot of set(...) in quotes when the argument may contain spaces, e.g. CMAKE_CURRENT_BINARY_DIR. It also uses LIST(APPEND) to add to the list of source files instead of just using set(). Together with additional quotes this should make things much less likely to screw up things. If noone objects I'll merge this to next tonight. Running the testsuite locally did not show any errors. Eike0001-FindQt4-extend-documentation.patch0002-Qt4Macros-improve-basename-extraction-in-QT4_ADD_DBU.patch0003-Qt4Macros-add-some-quotes-to-prevent-damage-from-spa.patch I don't think the test suite covers QtDbus. Perhaps that can be added? What about a case sensitive file system with .XML instead of .xml? Does your second patch break that? Other than that question, I have no objections. Thanks, Clint -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0013324]: Segfault with Swig CPLUSPLUS ON
The following issue has been SUBMITTED. == http://www.cmake.org/Bug/view.php?id=13324 == Reported By:jeromerobert Assigned To: == Project:CMake Issue ID: 13324 Category: CMake Reproducibility:always Severity: major Priority: normal Status: new == Date Submitted: 2012-06-20 09:44 EDT Last Modified: 2012-06-20 09:44 EDT == Summary:Segfault with Swig CPLUSPLUS ON Description: How to reproduce: $ cat CMakeLists.txt project (Foo C) cmake_minimum_required(VERSION 2.8) find_package(SWIG REQUIRED) include(${SWIG_USE_FILE}) set_source_files_properties(foo.i PROPERTIES CPLUSPLUS ON) swig_add_module(foo python foo.i) $ touch foo.i $ cmake . -- Configuring done Segmentation fault Expected result: A error message saying that it's wrong to enable the CPLUSPLUS property on a C only project. == Issue History Date ModifiedUsername FieldChange == 2012-06-20 09:44 jeromerobert New 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] target_automoc targets in VS2010 projects
On Wednesday 20 June 2012, Thomas Sondergaard wrote: Is it possible to hide the target_automoc targets when using the VS2010 generator? If it is not possible, it would be very useful if they could be put in a folder, ie set_property(GLOBAL PROPERTY USE_FOLDERS ON) set_property(GLOBAL PROPERTY AUTOMOC_FOLDER automoc) We tried putting the generated target_automoc targets in VS2010 folders manually like shown below, but it doesn't work. I don't have any Windows around. But if you can come up with a way how to do it, I can implement it. 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0013330]: CMAKE_CXX_COMPILER_INIT used in CMakeDetermineCCompiler.cmake
The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=13330 == Reported By:Jaime Frey Assigned To: == Project:CMake Issue ID: 13330 Category: CMake Reproducibility:have not tried Severity: minor Priority: normal Status: new == Date Submitted: 2012-06-20 14:56 EDT Last Modified: 2012-06-20 14:56 EDT == Summary:CMAKE_CXX_COMPILER_INIT used in CMakeDetermineCCompiler.cmake Description: At line 35 of CMakeDetermineCCompiler.cmake, CMAKE_CXX_COMPILER_INIT is set to NOTFOUND. I suspect it should be setting CMAKE_C_COMPILER_INIT instead, as that variable is used immediately below. I don't know what effect this would have on users. == Issue History Date ModifiedUsername FieldChange == 2012-06-20 14:56 Jaime Frey New 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0013331]: AIX linker chokes on spaces in rpath
The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=13331 == Reported By:Daniel R. Gomez Assigned To: == Project:CMake Issue ID: 13331 Category: CMake Reproducibility:always Severity: major Priority: normal Status: new == Date Submitted: 2012-06-20 15:14 EDT Last Modified: 2012-06-20 15:14 EDT == Summary:AIX linker chokes on spaces in rpath Description: I was looking into why so many tests were failing on my AIX 5.3 dashboard: http://open.cdash.org/viewTest.php?onlyfailedbuildid=2378283 It seems to come down to the linker's -blibpath option. Compare the below two invocations---the only difference is My Tests in the first one, and My_Tests in the second: host:~/Dashboards/My Tests/CMake-build/Tests/COnly env OBJECT_MODE=32 /usr/bin/gcc -mminimal-toc -O0 CMakeFiles/COnly.dir/conly.c.o CMakeFiles/COnly.dir/foo.c.o -o COnly libtestc1.a libtestc2.so -Wl,-blibpath:/home/cport/Dashboards/My Tests/CMake-build/Tests/COnly:/usr/lib:/lib ld: 0706-014 The -b Tests/CMake-build/Tests/COnly option is not recognized. collect2: ld returned 255 exit status host:~/Dashboards/My Tests/CMake-build/Tests/COnly env OBJECT_MODE=32 /usr/bin/gcc -mminimal-toc -O0 CMakeFiles/COnly.dir/conly.c.o CMakeFiles/COnly.dir/foo.c.o -o COnly libtestc1.a libtestc2.so -Wl,-blibpath:/home/cport/Dashboards/My_Tests/CMake-build/Tests/COnly:/usr/lib:/lib (no error) This should probably be checked when CMake first looks at the compiler/linker, as a fail-fast behavior would be helpful here. (I checked that this isn't a problem with gcc or even collect2 mishandling the option; I get the same error even if I pass -blibpath:... directly to ld.) == Issue History Date ModifiedUsername FieldChange == 2012-06-20 15:14 Daniel R. GomezNew 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0013332]: Can't link a shared library with cc on HP-UX
The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=13332 == Reported By:Daniel R. Gomez Assigned To: == Project:CMake Issue ID: 13332 Category: CMake Reproducibility:always Severity: minor Priority: normal Status: new == Date Submitted: 2012-06-20 15:48 EDT Last Modified: 2012-06-20 15:48 EDT == Summary:Can't link a shared library with cc on HP-UX Description: Bootstrapping 2.8.8 on HP-UX 11.00 with the vendor compiler fails with [...] Linking C shared module libcmsysTestDynload.sl cd /tmp/cmake-2.8.8-test/_build-cc/Source/kwsys /tmp/cmake-2.8.8-test/_build-cc/Bootstrap.cmk/cmake -E cmake_link_script CMakeFiles/cmsysTestDynload.dir/link.txt --verbose=1 /opt/ansic/bin/cc +Z -Ae +DA2.0 +ESlit +w1 -z -Wp,-H262144 +O2 -Wl,-E,+nodefaultrpath -b -L/usr/lib -Wl,+hlibcmsysTestDynload.sl -o libcmsysTestDynload.sl CMakeFiles/cmsysTestDynload.dir/testDynload.c.o -Wl,+b/usr/lib cc: warning 488: cc +help invokes On-Line C reference manual. cc: warning 422: Unknown option b ignored. /usr/ccs/bin/ld: Unsatisfied symbols: main (Not referenced yet! Probably due to -u option) gmake[2]: *** [Source/kwsys/libcmsysTestDynload.sl] Error 1 gmake[2]: Leaving directory `/tmp/cmake-2.8.8-test/_build-cc' gmake[1]: *** [Source/kwsys/CMakeFiles/cmsysTestDynload.dir/all] Error 2 gmake[1]: Leaving directory `/tmp/cmake-2.8.8-test/_build-cc' gmake: *** [all] Error 2 For one, that -b needs to be a -Wl,-b. If I do the compiler invocation that way, I get host:/tmp/cmake-2.8.8-test/_build-cc/Source/kwsys$ /opt/ansic/bin/ cc +Z -Ae +DA2.0 +ESlit +w1 -z -Wp,-H262144 +O2 -Wl,-E,+nodefaultrpath -Wl,-b -L /usr/lib -Wl,+hlibcmsysTestDynload.sl -o libcmsysTestDynload.sl CMakeFiles/cmsys TestDynload.dir/testDynload.c.o -Wl,+b/usr/lib /usr/ccs/bin/ld: CODE_ONE_SYM fixup to non-code subspace in file /opt/langtools/lib/crt0.o - shared library must be position independent. Use +z or +Z to recompile. Adding -v to that gives me cc: NLSPATH is /opt/ansic/lib/nls/msg/%L/%N.cat:/opt/ansic/lib/nls/msg/C/%N.cat: cc: CCOPTS is not set. cc: INCLUDIR is INCLUDIR=/usr/include cc: LPATH is /usr/lib:/opt/langtools/lib: /usr/ccs/bin/ld /opt/langtools/lib/crt0.o -u main -z -E +nodefaultrpath -b -L/usr/lib +hlibcmsysTestDynload.sl -o libcmsysTestDynload.sl CMakeFiles/cmsysTestDynload.dir/testDynload.c.o +b/usr/lib -lc cc: Entering Link editor. /usr/ccs/bin/ld: CODE_ONE_SYM fixup to non-code subspace in file /opt/langtools/lib/crt0.o - shared library must be position independent. Use +z or +Z to recompile. I don't know how crt0.o is getting in there, but if I invoke ld directly without that, the link works. There is probably an option that can be given to cc(1) so that it doesn't pass crt0.o to the linker, but I'm not seeing anything along those lines in the man page... == Issue History Date ModifiedUsername FieldChange == 2012-06-20 15:48 Daniel R. GomezNew 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] target_automoc targets in VS2010 projects
On 2012-06-20 18:49, Alexander Neundorf wrote: On Wednesday 20 June 2012, Thomas Sondergaard wrote: We tried putting the generated target_automoc targets in VS2010 folders manually like shown below, but it doesn't work. I don't have any Windows around. But if you can come up with a way how to do it, I can implement it. Thanks, I will look into it. Thomas -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] target_automoc targets in VS2010 projects
On Wed, Jun 20, 2012 at 4:58 PM, Thomas Sondergaard t...@medical-insight.comwrote: On 2012-06-20 18:49, Alexander Neundorf wrote: On Wednesday 20 June 2012, Thomas Sondergaard wrote: We tried putting the generated target_automoc targets in VS2010 folders manually like shown below, but it doesn't work. I don't have any Windows around. But if you can come up with a way how to do it, I can implement it. Thanks, I will look into it. Thomas -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/** opensource/opensource.htmlhttp://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/**CMake_FAQhttp://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-**bin/mailman/listinfo/cmake-**developershttp://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers Isn't it as simple as adding the target property when the targets are defined (presumably by CMake C++ code internally)? You could use the value of the proposed GLOBAL property as the value for each target. And adding appropriate property documentation, too, of course. -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[CMake] [CDash] dashboard missing uploaded builds
Since a few days my cdash dashboard has stopped showing certain uploaded builds. In the logfiles of the sites I can see they have been uploaded successfully, and I do see the files on the cdash server in the backup directory. The database does not show them however. The weird part is that it does not reproduce every day. Some builds that are missing one day may appear the next. Up untill a week ago it still worked, and I did add a few long running buildsteps to the builds that are missing. My setup: CDash-1.8.2 cmake version 2.8.5 The build is controlled by a ctest script that does the configuring, building and uploading. How do I debug this issue? Regards, Micha Hergarden -- 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] problem: No test configuration file found!
I think you could put the enable_testing() and add_test() statements in a file called CMakeTests.txt in your subdirectory and include that in your toplevel cmakelists.txt. That works for me anyway. I'm not sure if this is the official way it is supposed to be done though. Regards, Micha On 06/19/2012 11:19 PM, Robert Ramey wrote: I'm working through my first CMake/CTest project. My directory structure looks like safe_numerics/ CMakeLists.txt // #1 build/ // out of source build directory include/ examples/ doc/ tests/ CMakeLists.txt // #2 #1 looks like cmake_minimum_required(VERSION 2.6) project(safe_numerics) if(MSVC) add_definitions( /Gy /wd4244 # converting 'std::streamsize' in 'size_t' /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS ) endif(MSVC) set(CMAKE_VERBOSE_MAKEFILE on) set(CMAKE_BUILD_TYPE Debug) message(BOOST_ROOT = $ENV{BOOST_ROOT} ) include_directories($ENV{BOOST_ROOT}) # walk the tests directory to run tests add_subdirectory(tests) #2 looks like ENABLE_TESTING() add_executable(test_subtract test_subtract.cpp test_subtract1.cpp test_subtract2.cpp test_subtract3.cpp ) add_test( test_subtract test_subtract ) Here is what I do cd build cmake .. $ ls -1 ALL_BUILD.vcproj CMakeCache.txt CMakeFiles ZERO_CHECK.vcproj cmake_install.cmake safe_numerics.ncb safe_numerics.sln tests when I bring up safe_numerics.sln, I do see the test_subtract project, it builds and executes. BUT when I try to run CTest I get (among other stuff) $ctest * No test configuration file found! * ... Things I've tried. I eliminate the add_subdirectory and put all the sommand into file #1 . This did in fact build RUN_TESTS.vcproj. But I can't see what I did wroing and what the right way to fix it is. I'm lost as to what's wrong with this. Any help appreciated. Robert Ramey -- 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] Does install command have no replace (no overwrite) arguments?
Hi, I am using install command to package configuration files from source to destination, but I don't want to overwrite the configuration files if the files exist in destination. Are there any arguments in install(FILES ...) command to specify NO REPLACE, NO OVERWRITE options to destination installation? One solution might to use CPACK_RPM_USER_FILELIST to specify %config in rpm spec, but it is only specific rpm package, will have the same problem to debian or other packages, the install command seems better place to do it. Appreciate any helps. Thank you. -- View this message in context: http://cmake.3232098.n2.nabble.com/Does-install-command-have-no-replace-no-overwrite-arguments-tp7580444.html Sent from the CMake mailing list archive at Nabble.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
[CMake] Run the tests in an installed tree on another machine
cmake_install_example.tar.gz Description: cmake install example Hi, My purpose is to create a package that contains tests validating that it works well out of the box. I looked into the mailing list, the documentation, the web in general and I did not find any relevant way of doing this. Testing in the build tree is nice, but the fact that the tests pass on here do not imply the package will be good: some files may be missing in the package, the rpath are stripped, etc. For that reason, I would like to be able to run ctest on the installed package. The problems I listed are: A- the binaries must be retrieved in the install tree B- the tests must be shipped with the package C- not all the tests should be exported because some are specific to the build tree (test that the install passed for instance is not needed in the installed package) For A, I found out the install(EXPORT command would be useful to get the paths of the targets. For B and C, I guessed of some solutions, but no one was good enough: 1. the generated CTestTestfile.cmake could be used, but in this file the paths are absolute and the targets are not taken into account. For instance, from a test like add_test(NAME MyTest COMMAND main), the content of the CTestTestfile.cmake would be add_test(MyTest /home/.../main) and in this form, it is not directly exploitable anywhere. Moreover, I should parse it anyway to remove the not wanted tests. 2. at the end of the CMakeLists.cmake of the project, I could gather all the tests that have been added and write down a file like CTestTestfile.cmake. This does not work for tests added in sub directories because the content of the tests and their properties are forgotten when going back to the parent directory. 3. wrap add_test and set_tests_properties into custom macros that write down files that look like the CTestTestfile.cmake, but with the good form. IMHO, This seems to be the better choice. I have implemented the third solution to illustrate what I said. It is attached with the mail. Is there a solution more CMake-ish to do that? Is there any better solution? Samuel pgpyfWXFTuYIH.pgp Description: PGP signature -- 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] Adding *.obj geometry files...
On 06/19/2012 04:27 PM, Daniel Dekkers wrote: CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(HeaderOnlyTest) SET(SOURCE_FILE main.c) SET(RESOURCE_FILE test.xml) SET_SOURCE_FILES_PROPERTIES(${RESOURCE_FILE} PROPERTIES HEADER_FILE_ONLY TRUE) ADD_EXECUTABLE(HeaderOnlyTest ${SOURCE_FILE} ${RESOURCE_FILE}) SET_TARGET_PROPERTIES(HeaderOnlyTest PROPERTIES RESOURCE ${RESOURCE_FILE}) With the VS2010 generator, test.xml is included. With CMake 2.8.8 I get no test.xml at all in the project file. If I eliminate the RESOURCE property then I get test.xml with type ClInclude in the .vcxproj file, and it does not build. Please attach your resulting HeaderOnlyTest.vcxproj and the CMakeCache.txt from the build tree. -Brad -- 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] Xcode generation, transformation of framework includes to -F
I've encountered a problem with OSX framework detection, I think exposed due to updating to Xcode 4.3.3 (was previously using 4.3.2), though I'm sure the real issue is actually in my cmake-files. It appears that /Library/Frameworks is no longer searched by default (this makes sense for better SDK support), but the code in the XCode project generator to transform include paths to framework search paths isn't being invoked due to how I'm detecting the paths (i.e logic starting around line 1928 of cmGlobalXCodeGenerator) I have a custom framework /Library/Frameworks/ALUT.framework, and a FindALUT.cmake module which is very similar to other equivalents (eg, FindOpenAL.cmake from the official distribution). The include path is being detected as '/Library/Frameworks/ALUT.framework/Headers', which is why the include isn't being transformed to a framework search path - 'cmSystemTools::IsPathToFramework' is only considering paths which /end/ in .framework. My guess is this all worked before because XCode automatically searched /Library/Frameworks, hiding the issue. If I edit the project search paths in XCode manually to include /Library/Frameworks, I can compile as before. I think my bug is in my FindALUT.cmake module, in that the detected include path ends in Headers/ - the relevant fragment is below: FIND_PATH(ALUT_INCLUDE_DIR alut.h HINTS $ENV{ALUTDIR} PATH_SUFFIXES include/AL include/ALUT include PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /opt ) If it's relevant, my FindALUT.cmake already detects ALUT.framework using FIND_LIBRARY, and finds the correct framework path. I could special case on if (APPLE) in my FindALUT module, but none of the built-in modules do anything like that - they simply use FIND_LIBRARY FIND_PATH and apparently work. (But maybe because they're always detecting frameworks deployed inside /System?) This is tested with both cmake 2.8.7 and 2.8.8 Regards, James -- 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] Include directory issue ... -I are not separated?
Hi Eric, Very kind of you to reply. It is true that my example had some detritus from one of the examples that I did not prune. I apologize for the sloppiness and your advice certainly saves me some problems with the linker later. However, it does not change the compile behavior. If I understood you correctly with your advice the new file is: add_library(Hydro file1.F90 file2.F90 sflux_9c.F90) include_directories ( $(NETCDF_INC) ) add_executable (mymain mymain.F90 ) target_link_libraries (pmymain Hydro $(NETCDF_LIBRARIES) ) and the failure remains as below with the glued together -I lines: cd /home/myproj_cmake/build/Hydro /usr/local/dms/pkg/openmpi/1.4.3-intel12.0/bin/mpif90 -o CMakeFiles/Hydro.dir/sflux_9c.F90.o -I/home/myproj_cmake/src/Hydro/-I/usr/local/dms/pkg/netcdf/4.1.3-intel12.0-parallel/include -c /home/myproj_cmake/src/Hydro/sflux_9c.F90 Anything you would recommend? Where does the reference to Hydro even come from? Thanks! -Original Message- From: Eric Noulard [mailto:eric.noul...@gmail.com] Sent: Tuesday, June 19, 2012 10:57 PM To: Ateljevich, Eli Cc: cmake@cmake.org Subject: Re: [CMake] Include directory issue ... -I are not separated? 2012/6/20 Ateljevich, Eli e...@water.ca.gov: Hi everone. I am getting a funny include flag and I wonder if anyone can help. The project is in Fortran (though I don't think this matters) and the structure can be distilled to: /myproj /build /src /Hydro I do the build in /build in linux using cmake -DCMAKE_Fortran_COMPILER ../src. The /src and /src/Hydro CMakeLists.txt are given below and I try to include and link to the external netcdf library which is where I say it is -- I use the same envvar in a GNU makefile system. The library includes are actually needed in only the third file sflux_9c.F90, and it is on this file that the build fails: cd /home/myproj_cmake/build/Hydro /usr/local/dms/pkg/openmpi/1.4.3-intel12.0/bin/mpif90 -o CMakeFiles/Hydro.dir/sflux_9c.F90.o -I/home/myproj_cmake/src/Hydro/-I/usr/local/dms/pkg/netcdf/4.1.3-intel12.0-parallel/include -c /home/myproj_cmake/src/Hydro/sflux_9c.F90 Could it be because the two -I includes are glued together? Come to think of it, I did nothing to request the -I/home/myproj_cmake/src/Hydro/ part though I don't object to it. Can someone explain what I am doing wrong or give me a workaround? I think you misuse some CMake directive, keep reading... Very grateful, Eli = /src cmake_minimum_required (VERSION 2.6) project(MYPROJ) enable_language (Fortran) # Recurse into module libraries add_subdirectory( Hydro ) = /src/Hydro add_library(Hydro file1.F90 file2.F90 sflux_9c.F90) # Make sure the compiler can find include files from our Hydro library. include_directories ( $(NETCDF_INC) ) # Make sure the linker can find the Hydro library once it is built. link_directories ( ${SELFE_BINARY_DIR}/Hydro ) This previous one is wrong, link_directories is seldom used for your own library. The forthcoming target_link_libraries (mymain Hydro) is enough for CMake to find how to link mymain to Hydro lib. Try removing this link_directories line. add_executable ( mymain mymain.F90 ) # Link the executable to the Hydro library. target_link_libraries (mymain Hydro $(NETCDF_INC) ) This statement looks wrong as well NETCDF_INC must a path to an include directory not a path to a library? What you probably need is target_link_libraries (mymain Hydro $(NETCDF_LIBRARY) ) with NETCDF_LIBRARY being the full path to the NETCDF library. -- 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
Re: [CMake] Include directory issue ... -I are not separated?
2012/6/20 Ateljevich, Eli e...@water.ca.gov: Hi Eric, Very kind of you to reply. It is true that my example had some detritus from one of the examples that I did not prune. I apologize for the sloppiness and your advice certainly saves me some problems with the linker later. However, it does not change the compile behavior. If I understood you correctly with your advice the new file is: add_library(Hydro file1.F90 file2.F90 sflux_9c.F90) include_directories ( $(NETCDF_INC) ) add_executable (mymain mymain.F90 ) target_link_libraries (pmymain Hydro $(NETCDF_LIBRARIES) ) and the failure remains as below with the glued together -I lines: cd /home/myproj_cmake/build/Hydro /usr/local/dms/pkg/openmpi/1.4.3-intel12.0/bin/mpif90 -o CMakeFiles/Hydro.dir/sflux_9c.F90.o -I/home/myproj_cmake/src/Hydro/-I/usr/local/dms/pkg/netcdf/4.1.3-intel12.0-parallel/include -c /home/myproj_cmake/src/Hydro/sflux_9c.F90 Anything you would recommend? Where does the reference to Hydro even come from? Thanks! Don't know. What is the content of NETCDF_INC ? Try message(STATUS NETCDF_INC=${NETCDF_INC}) -- 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
Re: [CMake] Include directory issue ... -I are not separated?
Addendum: I should add that by now I have taken the failure line, put a space in between the two -I components and run it directly in the shell and verified it compiles fine (and without the space it fails as in cmake). Hi Eric, Very kind of you to reply. It is true that my example had some detritus from one of the examples that I did not prune. I apologize for the sloppiness and your advice certainly saves me some problems with the linker later. However, it does not change the compile behavior. If I understood you correctly with your advice the new file is: add_library(Hydro file1.F90 file2.F90 sflux_9c.F90) include_directories ( $(NETCDF_INC) ) add_executable (mymain mymain.F90 ) target_link_libraries (pmymain Hydro $(NETCDF_LIBRARIES) ) and the failure remains as below with the glued together -I lines: cd /home/myproj_cmake/build/Hydro /usr/local/dms/pkg/openmpi/1.4.3-intel12.0/bin/mpif90 -o CMakeFiles/Hydro.dir/sflux_9c.F90.o -I/home/myproj_cmake/src/Hydro/-I/usr/local/dms/pkg/netcdf/4.1.3-intel12.0-parallel/include -c /home/myproj_cmake/src/Hydro/sflux_9c.F90 Anything you would recommend? Where does the reference to Hydro even come from? Thanks! -Original Message- From: Eric Noulard [mailto:eric.noul...@gmail.com] Sent: Tuesday, June 19, 2012 10:57 PM To: Ateljevich, Eli Cc: cmake@cmake.org Subject: Re: [CMake] Include directory issue ... -I are not separated? 2012/6/20 Ateljevich, Eli e...@water.ca.gov: Hi everone. I am getting a funny include flag and I wonder if anyone can help. The project is in Fortran (though I don't think this matters) and the structure can be distilled to: /myproj /build /src /Hydro I do the build in /build in linux using cmake -DCMAKE_Fortran_COMPILER ../src. The /src and /src/Hydro CMakeLists.txt are given below and I try to include and link to the external netcdf library which is where I say it is -- I use the same envvar in a GNU makefile system. The library includes are actually needed in only the third file sflux_9c.F90, and it is on this file that the build fails: cd /home/myproj_cmake/build/Hydro /usr/local/dms/pkg/openmpi/1.4.3-intel12.0/bin/mpif90 -o CMakeFiles/Hydro.dir/sflux_9c.F90.o -I/home/myproj_cmake/src/Hydro/-I/usr/local/dms/pkg/netcdf/4.1.3-intel12.0-parallel/include -c /home/myproj_cmake/src/Hydro/sflux_9c.F90 Could it be because the two -I includes are glued together? Come to think of it, I did nothing to request the -I/home/myproj_cmake/src/Hydro/ part though I don't object to it. Can someone explain what I am doing wrong or give me a workaround? I think you misuse some CMake directive, keep reading... Very grateful, Eli = /src cmake_minimum_required (VERSION 2.6) project(MYPROJ) enable_language (Fortran) # Recurse into module libraries add_subdirectory( Hydro ) = /src/Hydro add_library(Hydro file1.F90 file2.F90 sflux_9c.F90) # Make sure the compiler can find include files from our Hydro library. include_directories ( $(NETCDF_INC) ) # Make sure the linker can find the Hydro library once it is built. link_directories ( ${SELFE_BINARY_DIR}/Hydro ) This previous one is wrong, link_directories is seldom used for your own library. The forthcoming target_link_libraries (mymain Hydro) is enough for CMake to find how to link mymain to Hydro lib. Try removing this link_directories line. add_executable ( mymain mymain.F90 ) # Link the executable to the Hydro library. target_link_libraries (mymain Hydro $(NETCDF_INC) ) This statement looks wrong as well NETCDF_INC must a path to an include directory not a path to a library? What you probably need is target_link_libraries (mymain Hydro $(NETCDF_LIBRARY) ) with NETCDF_LIBRARY being the full path to the NETCDF library. -- 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
[CMake] Configure separate from generate on the command line
Is there a way to configure separately from generate on the command line? cmake-gui allows this but I do not see an option for this for cmake.exe -- 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] Include directory issue ... -I are not separated?
2012/6/20 Ateljevich, Eli e...@water.ca.gov: Addendum: I should add that by now I have taken the failure line, put a space in between the two -I components and run it directly in the shell and verified it compiles fine (and without the space it fails as in cmake). Yes right. Collating -I shall fail, no problem. The question is why your CMakeLists.txt is generating such command line? As always evil may be in the details. Would you be able to copy/attach your CMakeLists.txt verbatim? Your previous quote shall not work since $(NETCDF_INC) is not a proper CMake syntax CMake uses braces i.e. ${NETCDF_INC} and not parenthesis. cmake -DCMAKE_Fortran_COMPILER ../src is wrong as well (no compiler value defined) and is probably not the good way to chose the Fortran compiler. Please give us exact content (which may be an excerpt) of your CMakeLists.txt and command lines used. -- 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
Re: [CMake] Configure separate from generate on the command line
2012/6/20 Robert Dailey rcdailey.li...@gmail.com: Is there a way to configure separately from generate on the command line? cmake-gui allows this but I do not see an option for this for cmake.exe I don't think it's possible. This command line does what you want (on Linux): echo c q | ccmake .. May I ask why do you want the feature? -- 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
Re: [CMake] problem: No test configuration file found!
I received the adive: include(CTest) instead of: enable_testing() Including CTest.cmake will automatically enable_testing(), but it also configures the test configuration file it's complaining about... and was rewarded with a working VS 9 project. The test_subtract project built - as it did before. I then built the Experimental project which generated the following output on my VS output window. 1-- Build started: Project: Experimental, Configuration: Debug 1Win32 -- Cannot find file: C:/Projects/Boost 1Projects/safe_numerics/build/tests/DartConfiguration.tcl 1 Site: 1 Build name: 1Create new tag: 20120619-2150 - Experimental Configure project Cannot 1find ConfigureCommand key in the DartConfiguration.tcl Cannot find 1file: C:/Projects/Boost 1Projects/safe_numerics/build/tests/DartConfiguration.tcl 1Build project 1Cannot find MakeCommand key in the DartConfiguration.tcl Cannot find 1file: C:/Projects/Boost 1Projects/safe_numerics/build/tests/DartConfiguration.tcl 1Test project C:/Projects/Boost Projects/safe_numerics/build/tests 1 Start 1: test_subtract 11/1 Test #1: test_subtract ***Exception: SegFault 10.42 sec 0% tests passed, 1 tests failed out of 1 Total Test time 1(real) = 0.52 sec The following tests FAILED: 1 1 - test_subtract (SEGFAULT) 1Cannot find file: C:/Projects/Boost 1Projects/safe_numerics/build/tests/DartConfiguration.tcl 1Performing coverage 1^CTerminate batch job (Y/N)? 1Build log was saved at file://c:\Projects\Boost Projects\safe_numerics\build\tests\Experimental.dir\Debug\BuildLog.htm 1Experimental - 0 error(s), 0 warning(s) 1 1 1The build has been canceled at the user's request that last command Performing Coverage seemed to hang this system so I canceled the build after a few minutes. The message: 1Cannot find file: C:/Projects/Boost 1Projects/safe_numerics/build/tests/DartConfiguration.tcl Note that I found a new file in my project: C:/Projects/Boost Projects/safe_numerics/build/DartConfiguration.tcl That is, directly in my build directory rather than in tests subdirectory. OK I moved this down to the tests directory and tried again. This looks more promising. Now when I try to build Experimental Project I get: 1-- Build started: Project: Experimental, Configuration: Debug Win32 -- 1 Site: RRSD01 1 Build name: Win32-vs9 1Create new tag: 20120619-2225 - Experimental Configure project 1 Each . represents 1024 bytes of output 1 . Size of output: 0K 1Build project 1 Each symbol represents 1024 bytes of output. 1 '!' represents an error and '*' a warning. 1 . Size of output: 0K 1 0 Compiler errors 1 0 Compiler warnings 1Test project C:/Projects/Boost Projects/safe_numerics/build No tests 1were found!!! 1Performing coverage 1 Cannot find any coverage files. Ignoring Coverage request. 1Submit files (using http) 1 Using HTTP submit method 1 Drop site:http:// 1 Submit failed, waiting 5 seconds... 1 Retry submission: Attempt 1 of 3 1 Submit failed, waiting 5 seconds... 1 Retry submission: Attempt 2 of 3 1 Submit failed, waiting 5 seconds... 1 Retry submission: Attempt 3 of 3 1 Error when uploading file: C:/Projects/Boost Projects/safe_numerics/build/Testing/20120619-2225/Build.xml 1 Error message was: Empty reply from server 1 Problems when submitting via HTTP 1Errors while running CTest 1Project : error PRJ0019: A tool returned an error code from Build log 1was saved at file://c:\Projects\Boost Projects\safe_numerics\build\tests\Experimental.dir\Debug\BuildLog.htm 1Experimental - 1 error(s), 0 warning(s) == Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped == ? still it's not what I expect to see. Is there some really obvious thing I've over looking here? Robert Ramey -- 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] Configure separate from generate on the command line
On Wed, Jun 20, 2012 at 12:04 PM, Eric Noulard eric.noul...@gmail.comwrote: 2012/6/20 Robert Dailey rcdailey.li...@gmail.com: Is there a way to configure separately from generate on the command line? cmake-gui allows this but I do not see an option for this for cmake.exe I don't think it's possible. This command line does what you want (on Linux): echo c q | ccmake .. May I ask why do you want the feature? Sometimes its useful just to perform the configuration step to verify the state of what will be generated, prior to doing that work. It gives me a chance to make any corrections or adjustments. -- 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 get target binary name?
I'm looking for the quickest and most natural way to get the final binary name of a target, ideally before add_executable() or add_library() is called (not sure if this is possible). For example, if my executable target's output is fubar.exe, I want to get fubar.exe in a variable. Any examples? Thanks. -- 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 get target binary name?
Another note: This has to work the same for both release and debug, and for both visual studio and makefile generators. On Wed, Jun 20, 2012 at 12:40 PM, Robert Dailey rcdailey.li...@gmail.comwrote: I'm looking for the quickest and most natural way to get the final binary name of a target, ideally before add_executable() or add_library() is called (not sure if this is possible). For example, if my executable target's output is fubar.exe, I want to get fubar.exe in a variable. Any examples? Thanks. -- 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 get target binary name?
Robert, I'm not sure this is exactly what you are looking for, but you may be able to use generator expressions. See the documentation for add_custom_command for more details, but basically you can use the expression $TARGET_FILE:foo to retrieve the executable name generated by target 'foo'. I think this only works after you use add_executable( foo ${src} ). -kt From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Robert Dailey Sent: Wednesday, June 20, 2012 11:41 AM To: CMake ML Subject: Re: [CMake] How to get target binary name? Another note: This has to work the same for both release and debug, and for both visual studio and makefile generators. On Wed, Jun 20, 2012 at 12:40 PM, Robert Dailey rcdailey.li...@gmail.commailto:rcdailey.li...@gmail.com wrote: I'm looking for the quickest and most natural way to get the final binary name of a target, ideally before add_executable() or add_library() is called (not sure if this is possible). For example, if my executable target's output is fubar.exe, I want to get fubar.exe in a variable. Any examples? Thanks. -- 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] Include directory issue ... -I are not separated?
I appreciate your patience as I seem to be struggling reporting some of the details properly. The real invocation is and has always been this: cmake -DCMAKE_Fortran_COMPILER=mpif90 ../src The CMakeLists.txt is below verbatim. 1. If I change to curly braces I get no -I in the compile command at all and the environment variable evaluates empty. 2. If I go back to parentheses I get the double -I problem as before. 3. If I ditch environement variables entirely the file compiles and I am on to the next error: include_directories (. /usr/local/dms/pkg/netcdf/4.1.3-intel12.0-parallel/include) Interestingly, if I don't include the . the next error has to do with not having the local build directory (src/Hydro) on the include path. So I guess I really do want both parts of the -I, I just don't want them glommed together. Thanks again, Eli === file CMakeLists.txt add_library(Hydro bktrk_subs.F90 elfe_glbl.F90 elfe_msgp.F90 grid_subs.F90 hydraulic_structures.F90 io_subs.F90 lap.F90 misc_subs.F90 sflux_9c.F90 solver_subs.F90 transport.F90) include_directories ( ${NETCDF_INC} ) add_executable ( pelfe elfe_main.F90 ) target_link_libraries (pelfe Hydro ${NETCDF_LIB} ) Curly-brace Output: [ 33%] Building Fortran object Hydro/CMakeFiles/Hydro.dir/sflux_9c.F90.o cd /home/eli/work/selfe_cmake/build/Hydro /usr/local/dms/pkg/openmpi/1.4.3-intel12.0/bin/mpif90 -o CMakeFiles/Hydro.dir/sflux_9c.F90.o -c /home/eli/work/selfe_cmake/src/Hydro/sflux_9c.F90 [ 33%] Building Fortran object Hydro/CMakeFiles/Hydro.dir/sflux_9c.F90.o cd /home/eli/work/selfe_cmake/build/Hydro /usr/local/dms/pkg/openmpi/1.4.3-intel12.0/bin/mpif90 -o CMakeFiles/Hydro.dir/sflux_9c.F90.o -I/home/eli/work/selfe_cmake/src/Hydro/-I/usr/local/dms/pkg/netcdf/4.1.3-intel12.0-parallel/include -c /home/eli/work/selfe_cmake/src/Hydro/sflux_9c.F90 -Original Message- From: Eric Noulard [mailto:eric.noul...@gmail.com] Sent: Wednesday, June 20, 2012 9:58 AM To: Ateljevich, Eli Cc: cmake@cmake.org Subject: Re: [CMake] Include directory issue ... -I are not separated? 2012/6/20 Ateljevich, Eli e...@water.ca.gov: Addendum: I should add that by now I have taken the failure line, put a space in between the two -I components and run it directly in the shell and verified it compiles fine (and without the space it fails as in cmake). Yes right. Collating -I shall fail, no problem. The question is why your CMakeLists.txt is generating such command line? As always evil may be in the details. Would you be able to copy/attach your CMakeLists.txt verbatim? Your previous quote shall not work since $(NETCDF_INC) is not a proper CMake syntax CMake uses braces i.e. ${NETCDF_INC} and not parenthesis. cmake -DCMAKE_Fortran_COMPILER ../src is wrong as well (no compiler value defined) and is probably not the good way to chose the Fortran compiler. Please give us exact content (which may be an excerpt) of your CMakeLists.txt and command lines used. -- 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
Re: [CMake] Another minor docs issue; no FILE(DIFFERENT ... ) documentation?
Yes, it was implemented as part of supporting another feature, and was left undocumented at the time. And it stuck. This comment is in the source code, though, and the current implementation will return 1 or 0 in ${variable}: /* FILE(DIFFERENT variable FILES lhs rhs) */ HTH, David On Tue, Jun 19, 2012 at 10:46 PM, Doug douglas.lin...@gmail.com wrote: is FILE(DIFFERENT ...) depreciated or reserved for internal use or something? It doesnt turn up in the docs online or the internal docs in Source/cmFileCommand.h Definitely in Sources/cmFileCommand.cxx though: else if ( subCommand == DIFFERENT ) { return this-HandleDifferentCommand(args); Just an omission from the docs? ~ Doug. -- 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] How to get target binary name?
If I were to try to do this *after* calling add_executable() or add_library(), would it be easier to obtain? On Wed, Jun 20, 2012 at 12:54 PM, Thompson, K T k...@lanl.gov wrote: Robert, ** ** I’m not sure this is exactly what you are looking for, but you may be able to use “generator expressions.” See the documentation for add_custom_command for more details, but basically you can use the expression $TARGET_FILE:foo to retrieve the executable name generated by target ‘foo’. I think this only works after you use add_executable( foo ${src} ). ** ** -kt ** ** ** ** ** ** *From:* cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] *On Behalf Of *Robert Dailey *Sent:* Wednesday, June 20, 2012 11:41 AM *To:* CMake ML *Subject:* Re: [CMake] How to get target binary name? ** ** Another note: This has to work the same for both release and debug, and for both visual studio and makefile generators. On Wed, Jun 20, 2012 at 12:40 PM, Robert Dailey rcdailey.li...@gmail.com wrote: I'm looking for the quickest and most natural way to get the final binary name of a target, ideally before add_executable() or add_library() is called (not sure if this is possible). ** ** For example, if my executable target's output is fubar.exe, I want to get fubar.exe in a variable. ** ** Any examples? Thanks. ** ** -- 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] Change the VS linker
Is it possible to change what executable is used for linking in VS targets? I see CMAKE_LINKER, but the variable says CMAKE_LINKER-NOTFOUND, which leads me to believe that the VS generator doesn't use this variable. Thanks, James -- 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 get target binary name?
Yes, with: http://cmake.org/cmake/help/v2.8.8/cmake.html#prop_tgt:LOCATION or http://cmake.org/cmake/help/v2.8.8/cmake.html#prop_tgt:LOCATION_CONFIGfor per-config values and: http://cmake.org/cmake/help/v2.8.8/cmake.html#command:get_filename_component HTH, David On Wed, Jun 20, 2012 at 2:33 PM, Robert Dailey rcdailey.li...@gmail.comwrote: If I were to try to do this *after* calling add_executable() or add_library(), would it be easier to obtain? On Wed, Jun 20, 2012 at 12:54 PM, Thompson, K T k...@lanl.gov wrote: Robert, ** ** I’m not sure this is exactly what you are looking for, but you may be able to use “generator expressions.” See the documentation for add_custom_command for more details, but basically you can use the expression $TARGET_FILE:foo to retrieve the executable name generated by target ‘foo’. I think this only works after you use add_executable( foo ${src} ). ** ** -kt ** ** ** ** ** ** *From:* cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] *On Behalf Of *Robert Dailey *Sent:* Wednesday, June 20, 2012 11:41 AM *To:* CMake ML *Subject:* Re: [CMake] How to get target binary name? ** ** Another note: This has to work the same for both release and debug, and for both visual studio and makefile generators. On Wed, Jun 20, 2012 at 12:40 PM, Robert Dailey rcdailey.li...@gmail.com wrote: I'm looking for the quickest and most natural way to get the final binary name of a target, ideally before add_executable() or add_library() is called (not sure if this is possible). ** ** For example, if my executable target's output is fubar.exe, I want to get fubar.exe in a variable. ** ** Any examples? Thanks. ** ** -- 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] How to get target binary name?
But do especially note: The path may contain a build-system-specific portion that is replaced at build time with the configuration getting built (such as $(ConfigurationName) in VS). On Wed, Jun 20, 2012 at 2:48 PM, David Cole david.c...@kitware.com wrote: Yes, with: http://cmake.org/cmake/help/v2.8.8/cmake.html#prop_tgt:LOCATION or http://cmake.org/cmake/help/v2.8.8/cmake.html#prop_tgt:LOCATION_CONFIGfor per-config values and: http://cmake.org/cmake/help/v2.8.8/cmake.html#command:get_filename_component HTH, David On Wed, Jun 20, 2012 at 2:33 PM, Robert Dailey rcdailey.li...@gmail.comwrote: If I were to try to do this *after* calling add_executable() or add_library(), would it be easier to obtain? On Wed, Jun 20, 2012 at 12:54 PM, Thompson, K T k...@lanl.gov wrote: Robert, ** ** I’m not sure this is exactly what you are looking for, but you may be able to use “generator expressions.” See the documentation for add_custom_command for more details, but basically you can use the expression $TARGET_FILE:foo to retrieve the executable name generated by target ‘foo’. I think this only works after you use add_executable( foo ${src} ). ** ** -kt ** ** ** ** ** ** *From:* cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] *On Behalf Of *Robert Dailey *Sent:* Wednesday, June 20, 2012 11:41 AM *To:* CMake ML *Subject:* Re: [CMake] How to get target binary name? ** ** Another note: This has to work the same for both release and debug, and for both visual studio and makefile generators. On Wed, Jun 20, 2012 at 12:40 PM, Robert Dailey rcdailey.li...@gmail.com wrote: I'm looking for the quickest and most natural way to get the final binary name of a target, ideally before add_executable() or add_library() is called (not sure if this is possible). ** ** For example, if my executable target's output is fubar.exe, I want to get fubar.exe in a variable. ** ** Any examples? Thanks. ** ** -- 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] Change the VS linker
The VS generator does not use that variable, and I don't know the exact answer to how this is computed everywhere... But I strongly suspect that VS simply uses link.exe and uses the first one found within whatever environment is set up in Visual Studio. To see the environment that is available at build time, you could add a custom target like this: add_custom_target(EchoEnv ${CMAKE_COMMAND} -E environment) HTH, David On Wed, Jun 20, 2012 at 2:45 PM, James Bigler jamesbig...@gmail.com wrote: Is it possible to change what executable is used for linking in VS targets? I see CMAKE_LINKER, but the variable says CMAKE_LINKER-NOTFOUND, which leads me to believe that the VS generator doesn't use this variable. Thanks, James -- 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] Current binary directory confusion
${CMAKE_CURRENT_BINARY_DIR} returns a directory that contains generated files, such as vcproj files when generating for visual studio. However, actual compiled binaries are placed: ${CMAKE_CURRENT_BINARY_DIR}/${target_name}.dir/Debug (for debug configuration) Is there a variable or target property that will give me the following path for any target: ${CMAKE_CURRENT_BINARY_DIR}/${target_name}.dir (I don't care about debug/release being part of the path, I just want the target.dir part to be included in the path. Right now I'm hard-coding the .dir directory and appending it to my path, but I don't know if this naming scheme is guaranteed by CMake or if it will change in the future. -- 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] Change the VS linker
Asking around here at NVIDIA, it looks like you can replace the linker in VS 2010 (MSBuild probably has the ability), but VS 2008 doesn't support this. On Wed, Jun 20, 2012 at 12:53 PM, David Cole david.c...@kitware.com wrote: The VS generator does not use that variable, and I don't know the exact answer to how this is computed everywhere... But I strongly suspect that VS simply uses link.exe and uses the first one found within whatever environment is set up in Visual Studio. To see the environment that is available at build time, you could add a custom target like this: add_custom_target(EchoEnv ${CMAKE_COMMAND} -E environment) HTH, David On Wed, Jun 20, 2012 at 2:45 PM, James Bigler jamesbig...@gmail.comwrote: Is it possible to change what executable is used for linking in VS targets? I see CMAKE_LINKER, but the variable says CMAKE_LINKER-NOTFOUND, which leads me to believe that the VS generator doesn't use this variable. Thanks, James -- 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] Generating Eclipse project failed ( MacOS + Eclipse CDT 3.7 + vtk )
On Wednesday 20 June 2012, Jana Sefcikova wrote: Dear users, I am new in CMake and I followed tutorial http://www.vtk.org/Wiki/Eclipse_CDT4_Generator , downloaded latest c++ Eclipse , my cmake version is 2.8.7 I obtained following warning/error ? during cmake configuration of my project : -- Could not determine Eclipse version, assuming at least 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong. So I used cmake-gui to present manually version to 3.7 and run configuration again. I got exactly same message. This is just a warning, not an error. The files should be generated nevertheless. Tutorial states that eclipse projects .project and .cproject should be generated but they are not generated. Sorry for a stupid question: .project and .cproject are hidden files. They are really not there ? 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] How to get target binary name?
Hi, More generally speaking, I'm looking a way to query the existing configuration in terms of - what are the libraries, executables, tests, etc... - properties, compiler flags declared through out various CMakeLists.txt and WHERE they are declared ie in which directory (package) This is also related with the former question: why to separate config phase from build phase? In a very large project, made of a large number of packages in a wide DAG , developped by a large teas of developers, it's very desirable to QUERY such config without having to find/grep through out the zillions of CMakeLists.txt files. It should trivial for CMake developers to add a kind of Database of all items to be constructed (basically all targets + how they are setup) goals: - debugging purposes - understanding why/where/how a target exists - understanding the relationships/dependencies between targets (even for those are not under your control) - figure out the directory structure of the software base I have managed to replace most of the add_xxx functions (plus some others) so as to offer the query feature to CMake but would it be offered by native CMake, this would be safer and efficient. Comments? Regards Christian Le 20/06/2012 20:48, David Cole a écrit : Yes, with: http://cmake.org/cmake/help/v2.8.8/cmake.html#prop_tgt:LOCATION or http://cmake.org/cmake/help/v2.8.8/cmake.html#prop_tgt:LOCATION_CONFIG for per-config values and: http://cmake.org/cmake/help/v2.8.8/cmake.html#command:get_filename_component HTH, David On Wed, Jun 20, 2012 at 2:33 PM, Robert Dailey rcdailey.li...@gmail.com mailto:rcdailey.li...@gmail.com wrote: If I were to try to do this *after* calling add_executable() or add_library(), would it be easier to obtain? On Wed, Jun 20, 2012 at 12:54 PM, Thompson, K T k...@lanl.gov mailto:k...@lanl.gov wrote: Robert, I'm not sure this is exactly what you are looking for, but you may be able to use generator expressions. See the documentation for add_custom_command for more details, but basically you can use the expression $TARGET_FILE:foo to retrieve the executable name generated by target 'foo'. I think this only works after you use add_executable( foo ${src} ). -kt *From:*cmake-boun...@cmake.org mailto:cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org mailto:cmake-boun...@cmake.org] *On Behalf Of *Robert Dailey *Sent:* Wednesday, June 20, 2012 11:41 AM *To:* CMake ML *Subject:* Re: [CMake] How to get target binary name? Another note: This has to work the same for both release and debug, and for both visual studio and makefile generators. On Wed, Jun 20, 2012 at 12:40 PM, Robert Dailey rcdailey.li...@gmail.com mailto:rcdailey.li...@gmail.com wrote: I'm looking for the quickest and most natural way to get the final binary name of a target, ideally before add_executable() or add_library() is called (not sure if this is possible). For example, if my executable target's output is fubar.exe, I want to get fubar.exe in a variable. Any examples? Thanks. -- Powered by www.kitware.com http://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 -- | Christian Arnault| | LAL Bat 200 pièce 03a| | 91405 Orsay CEDEX| | phone : (33) 1 64 46 84 24 | | gsm : (33) 6 77 27 62 30 | | fax : (33) 1 69 07 94 04 | | e-mail : christian.arna...@lal.in2p3.fr | -- 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] Generating Eclipse project failed ( MacOS + Eclipse CDT 3.7 + vtk )
Hi Alexander, They are there - hidden :) Thank you. Jana -- 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] Include directory issue ... -I are not separated?
Eric I have improved my envvar usage a bit further, I hope, by saying include_directories( $ENV{NETCDF_INC} ) rather than include_directories( ${NETCDF_INC} ) However, I am now quite sure that what is happening is when I put hardwired absolute paths in include_directories it is used as-is, but when I put in environment variables the project build path is being prepended to it. Can I disable this? Thanks, Eli -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Ateljevich, Eli Sent: Wednesday, June 20, 2012 11:06 AM To: Eric Noulard Cc: cmake@cmake.org Subject: Re: [CMake] Include directory issue ... -I are not separated? I appreciate your patience as I seem to be struggling reporting some of the details properly. The real invocation is and has always been this: cmake -DCMAKE_Fortran_COMPILER=mpif90 ../src The CMakeLists.txt is below verbatim. 1. If I change to curly braces I get no -I in the compile command at all and the environment variable evaluates empty. 2. If I go back to parentheses I get the double -I problem as before. 3. If I ditch environement variables entirely the file compiles and I am on to the next error: include_directories (. /usr/local/dms/pkg/netcdf/4.1.3-intel12.0-parallel/include) Interestingly, if I don't include the . the next error has to do with not having the local build directory (src/Hydro) on the include path. So I guess I really do want both parts of the -I, I just don't want them glommed together. Thanks again, Eli === file CMakeLists.txt add_library(Hydro bktrk_subs.F90 elfe_glbl.F90 elfe_msgp.F90 grid_subs.F90 hydraulic_structures.F90 io_subs.F90 lap.F90 misc_subs.F90 sflux_9c.F90 solver_subs.F90 transport.F90) include_directories ( ${NETCDF_INC} ) add_executable ( pelfe elfe_main.F90 ) target_link_libraries (pelfe Hydro ${NETCDF_LIB} ) Curly-brace Output: [ 33%] Building Fortran object Hydro/CMakeFiles/Hydro.dir/sflux_9c.F90.o cd /home/eli/work/selfe_cmake/build/Hydro /usr/local/dms/pkg/openmpi/1.4.3-intel12.0/bin/mpif90 -o CMakeFiles/Hydro.dir/sflux_9c.F90.o -c /home/eli/work/selfe_cmake/src/Hydro/sflux_9c.F90 [ 33%] Building Fortran object Hydro/CMakeFiles/Hydro.dir/sflux_9c.F90.o cd /home/eli/work/selfe_cmake/build/Hydro /usr/local/dms/pkg/openmpi/1.4.3-intel12.0/bin/mpif90 -o CMakeFiles/Hydro.dir/sflux_9c.F90.o -I/home/eli/work/selfe_cmake/src/Hydro/-I/usr/local/dms/pkg/netcdf/4.1.3-intel12.0-parallel/include -c /home/eli/work/selfe_cmake/src/Hydro/sflux_9c.F90 -Original Message- From: Eric Noulard [mailto:eric.noul...@gmail.com] Sent: Wednesday, June 20, 2012 9:58 AM To: Ateljevich, Eli Cc: cmake@cmake.org Subject: Re: [CMake] Include directory issue ... -I are not separated? 2012/6/20 Ateljevich, Eli e...@water.ca.gov: Addendum: I should add that by now I have taken the failure line, put a space in between the two -I components and run it directly in the shell and verified it compiles fine (and without the space it fails as in cmake). Yes right. Collating -I shall fail, no problem. The question is why your CMakeLists.txt is generating such command line? As always evil may be in the details. Would you be able to copy/attach your CMakeLists.txt verbatim? Your previous quote shall not work since $(NETCDF_INC) is not a proper CMake syntax CMake uses braces i.e. ${NETCDF_INC} and not parenthesis. cmake -DCMAKE_Fortran_COMPILER ../src is wrong as well (no compiler value defined) and is probably not the good way to chose the Fortran compiler. Please give us exact content (which may be an excerpt) of your CMakeLists.txt and command lines used. -- 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
Re: [CMake] Include directory issue ... -I are not separated?
Well, thanks to your hints, I did end up resolving this by finding a user error in the environment that would not have affected make. So ... worst user post I have ever made, but you did teach me a lot at the beginning about the environment that would have killed me soon enough. E -Original Message- From: Ateljevich, Eli Sent: Wednesday, June 20, 2012 3:05 PM To: Ateljevich, Eli; Eric Noulard Cc: cmake@cmake.org Subject: RE: [CMake] Include directory issue ... -I are not separated? Eric I have improved my envvar usage a bit further, I hope, by saying include_directories( $ENV{NETCDF_INC} ) rather than include_directories( ${NETCDF_INC} ) However, I am now quite sure that what is happening is when I put hardwired absolute paths in include_directories it is used as-is, but when I put in environment variables the project build path is being prepended to it. Can I disable this? Thanks, Eli -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Ateljevich, Eli Sent: Wednesday, June 20, 2012 11:06 AM To: Eric Noulard Cc: cmake@cmake.org Subject: Re: [CMake] Include directory issue ... -I are not separated? I appreciate your patience as I seem to be struggling reporting some of the details properly. The real invocation is and has always been this: cmake -DCMAKE_Fortran_COMPILER=mpif90 ../src The CMakeLists.txt is below verbatim. 1. If I change to curly braces I get no -I in the compile command at all and the environment variable evaluates empty. 2. If I go back to parentheses I get the double -I problem as before. 3. If I ditch environement variables entirely the file compiles and I am on to the next error: include_directories (. /usr/local/dms/pkg/netcdf/4.1.3-intel12.0-parallel/include) Interestingly, if I don't include the . the next error has to do with not having the local build directory (src/Hydro) on the include path. So I guess I really do want both parts of the -I, I just don't want them glommed together. Thanks again, Eli === file CMakeLists.txt add_library(Hydro bktrk_subs.F90 elfe_glbl.F90 elfe_msgp.F90 grid_subs.F90 hydraulic_structures.F90 io_subs.F90 lap.F90 misc_subs.F90 sflux_9c.F90 solver_subs.F90 transport.F90) include_directories ( ${NETCDF_INC} ) add_executable ( pelfe elfe_main.F90 ) target_link_libraries (pelfe Hydro ${NETCDF_LIB} ) Curly-brace Output: [ 33%] Building Fortran object Hydro/CMakeFiles/Hydro.dir/sflux_9c.F90.o cd /home/eli/work/selfe_cmake/build/Hydro /usr/local/dms/pkg/openmpi/1.4.3-intel12.0/bin/mpif90 -o CMakeFiles/Hydro.dir/sflux_9c.F90.o -c /home/eli/work/selfe_cmake/src/Hydro/sflux_9c.F90 [ 33%] Building Fortran object Hydro/CMakeFiles/Hydro.dir/sflux_9c.F90.o cd /home/eli/work/selfe_cmake/build/Hydro /usr/local/dms/pkg/openmpi/1.4.3-intel12.0/bin/mpif90 -o CMakeFiles/Hydro.dir/sflux_9c.F90.o -I/home/eli/work/selfe_cmake/src/Hydro/-I/usr/local/dms/pkg/netcdf/4.1.3-intel12.0-parallel/include -c /home/eli/work/selfe_cmake/src/Hydro/sflux_9c.F90 -Original Message- From: Eric Noulard [mailto:eric.noul...@gmail.com] Sent: Wednesday, June 20, 2012 9:58 AM To: Ateljevich, Eli Cc: cmake@cmake.org Subject: Re: [CMake] Include directory issue ... -I are not separated? 2012/6/20 Ateljevich, Eli e...@water.ca.gov: Addendum: I should add that by now I have taken the failure line, put a space in between the two -I components and run it directly in the shell and verified it compiles fine (and without the space it fails as in cmake). Yes right. Collating -I shall fail, no problem. The question is why your CMakeLists.txt is generating such command line? As always evil may be in the details. Would you be able to copy/attach your CMakeLists.txt verbatim? Your previous quote shall not work since $(NETCDF_INC) is not a proper CMake syntax CMake uses braces i.e. ${NETCDF_INC} and not parenthesis. cmake -DCMAKE_Fortran_COMPILER ../src is wrong as well (no compiler value defined) and is probably not the good way to chose the Fortran compiler. Please give us exact content (which may be an excerpt) of your CMakeLists.txt and command lines used. -- 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
Re: [CMake] problem: No test configuration file found!
Put the include(CTest) line in your top level CMakeLists.txt file. Do a full clean re-configure (remove the build directory, make a new empty build directory and run CMake again). If it still happens after that, we need more details about your project. You should be able to build Experimental (or just run ctest) after a configure of a project that includes CTest, and uses add_test to add tests to the project. HTH, David On Wed, Jun 20, 2012 at 2:43 PM, Robert Ramey ra...@rrsd.com wrote: I received the adive: include(CTest) instead of: enable_testing() Including CTest.cmake will automatically enable_testing(), but it also configures the test configuration file it's complaining about... and was rewarded with a working VS 9 project. The test_subtract project built - as it did before. I then built the Experimental project which generated the following output on my VS output window. 1-- Build started: Project: Experimental, Configuration: Debug 1Win32 -- Cannot find file: C:/Projects/Boost 1Projects/safe_numerics/build/tests/DartConfiguration.tcl 1 Site: 1 Build name: 1Create new tag: 20120619-2150 - Experimental Configure project Cannot 1find ConfigureCommand key in the DartConfiguration.tcl Cannot find 1file: C:/Projects/Boost 1Projects/safe_numerics/build/tests/DartConfiguration.tcl 1Build project 1Cannot find MakeCommand key in the DartConfiguration.tcl Cannot find 1file: C:/Projects/Boost 1Projects/safe_numerics/build/tests/DartConfiguration.tcl 1Test project C:/Projects/Boost Projects/safe_numerics/build/tests 1 Start 1: test_subtract 11/1 Test #1: test_subtract ***Exception: SegFault 10.42 sec 0% tests passed, 1 tests failed out of 1 Total Test time 1(real) = 0.52 sec The following tests FAILED: 1 1 - test_subtract (SEGFAULT) 1Cannot find file: C:/Projects/Boost 1Projects/safe_numerics/build/tests/DartConfiguration.tcl 1Performing coverage 1^CTerminate batch job (Y/N)? 1Build log was saved at file://c:\Projects\Boost Projects\safe_numerics\build\tests\Experimental.dir\Debug\BuildLog.htm 1Experimental - 0 error(s), 0 warning(s) 1 1 1The build has been canceled at the user's request that last command Performing Coverage seemed to hang this system so I canceled the build after a few minutes. The message: 1Cannot find file: C:/Projects/Boost 1Projects/safe_numerics/build/tests/DartConfiguration.tcl Note that I found a new file in my project: C:/Projects/Boost Projects/safe_numerics/build/DartConfiguration.tcl That is, directly in my build directory rather than in tests subdirectory. OK I moved this down to the tests directory and tried again. This looks more promising. Now when I try to build Experimental Project I get: 1-- Build started: Project: Experimental, Configuration: Debug Win32 -- 1 Site: RRSD01 1 Build name: Win32-vs9 1Create new tag: 20120619-2225 - Experimental Configure project 1 Each . represents 1024 bytes of output 1 . Size of output: 0K 1Build project 1 Each symbol represents 1024 bytes of output. 1 '!' represents an error and '*' a warning. 1 . Size of output: 0K 1 0 Compiler errors 1 0 Compiler warnings 1Test project C:/Projects/Boost Projects/safe_numerics/build No tests 1were found!!! 1Performing coverage 1 Cannot find any coverage files. Ignoring Coverage request. 1Submit files (using http) 1 Using HTTP submit method 1 Drop site:http:// 1 Submit failed, waiting 5 seconds... 1 Retry submission: Attempt 1 of 3 1 Submit failed, waiting 5 seconds... 1 Retry submission: Attempt 2 of 3 1 Submit failed, waiting 5 seconds... 1 Retry submission: Attempt 3 of 3 1 Error when uploading file: C:/Projects/Boost Projects/safe_numerics/build/Testing/20120619-2225/Build.xml 1 Error message was: Empty reply from server 1 Problems when submitting via HTTP 1Errors while running CTest 1Project : error PRJ0019: A tool returned an error code from Build log 1was saved at file://c:\Projects\Boost Projects\safe_numerics\build\tests\Experimental.dir\Debug\BuildLog.htm 1Experimental - 1 error(s), 0 warning(s) == Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped == ? still it's not what I expect to see. Is there some really obvious thing I've over looking here? Robert Ramey -- 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] Install COMPONENT bug?
According to the documentation, an install command like this: INSTALL ( TARGETS myTarget EXPORT myExportedTargets RUNTIME DESTINATION bin COMPONENT component1 LIBRARY DESTINATION lib COMPONENT component2 ARCHIVE DESTINATION bin COMPONENT component3 ) should produce 3 components. And I've seen this pattern in a number of cmake files. Yet, it only produces one (the first) component. This cmake file illustrates the problem: cmake_minimum_required(VERSION 2.8) project(bug) add_executable(myTarget a.cxx) target_link_libraries(myTarget -lm) INSTALL ( TARGETS myTarget EXPORT myExportedTargets RUNTIME DESTINATION bin COMPONENT component1 LIBRARY DESTINATION lib COMPONENT component2 ARCHIVE DESTINATION bin COMPONENT component3 ) get_cmake_property(PROPS COMPONENTS) message(STATUS COMPONENTS: ${PROPS}) - the message produces: -- COMPONENTS: component1 -- 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] INSTALL documentation does not mention default component Unspecified
If an INSTALL command does not provide a COMPONENT, it seems that a component named Unspecified is created. This is not mentioned anywhere in the cmake documentation as far as I can tell. This cmake file illustrates the problem: cmake_minimum_required(VERSION 2.8) project(bug) add_executable(myTarget a.cxx) target_link_libraries(myTarget -lm) INSTALL ( TARGETS myTarget EXPORT myExportedTargets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION bin ) get_cmake_property(PROPS COMPONENTS) message(STATUS COMPONENTS: ${PROPS}) -- 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-commits] CMake branch, next, updated. v2.8.8-3265-g5a7ae88
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 5a7ae88566f14ea2253c4bcfec57044f45404392 (commit) via 2c2fbaf0e5902d62a4321cdac125778a2170ec5d (commit) from ebb3c952db187bfcc061abb7efe5d55fb0fe14ec (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5a7ae88566f14ea2253c4bcfec57044f45404392 commit 5a7ae88566f14ea2253c4bcfec57044f45404392 Merge: ebb3c95 2c2fbaf Author: Brad King brad.k...@kitware.com AuthorDate: Wed Jun 20 09:10:08 2012 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Wed Jun 20 09:10:08 2012 -0400 Merge topic 'no-source-language-crash' into next 2c2fbaf Do not crash on unknown source language (#13323) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c2fbaf0e5902d62a4321cdac125778a2170ec5d commit 2c2fbaf0e5902d62a4321cdac125778a2170ec5d Author: Mariusz Plucinski plucinski.mari...@gmail.com AuthorDate: Wed Jun 20 08:02:00 2012 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Wed Jun 20 08:59:54 2012 -0400 Do not crash on unknown source language (#13323) If a source file extension is not recognized as any language then src.GetLanguage() may return NULL. Check the result before dereferencing in cmLocalGenerator::GetObjectFileNameWithoutTarget. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 13ede5d..32cfa68 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2764,10 +2764,13 @@ cmLocalGenerator bool replaceExt = this-NeedBackwardsCompatibility(2, 4); if(!replaceExt) { - std::string repVar = CMAKE_; - repVar += source.GetLanguage(); - repVar += _OUTPUT_EXTENSION_REPLACE; - replaceExt = this-Makefile-IsOn(repVar.c_str()); + if(const char* lang = source.GetLanguage()) +{ +std::string repVar = CMAKE_; +repVar += lang; +repVar += _OUTPUT_EXTENSION_REPLACE; +replaceExt = this-Makefile-IsOn(repVar.c_str()); +} } // Remove the source extension if it is to be replaced. --- Summary of changes: Source/cmLocalGenerator.cxx | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v2.8.8-3268-g8d1bb7c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 8d1bb7cf2d6c0505e9827f4da18f5dc754cb6054 (commit) via 5c153c62f3780bdc4976a9d25e6b0c217170558e (commit) via 30305b989e944d0b5bdff16ba408d636a8c81e91 (commit) from 5a7ae88566f14ea2253c4bcfec57044f45404392 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8d1bb7cf2d6c0505e9827f4da18f5dc754cb6054 commit 8d1bb7cf2d6c0505e9827f4da18f5dc754cb6054 Merge: 5a7ae88 5c153c6 Author: Brad King brad.k...@kitware.com AuthorDate: Wed Jun 20 10:20:11 2012 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Wed Jun 20 10:20:11 2012 -0400 Merge topic 'CTestUpdateGit-safecrlf' into next 5c153c6 Make CTest.UpdateGIT robust to Git safecrlf on Windows 30305b9 CMake Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5c153c62f3780bdc4976a9d25e6b0c217170558e commit 5c153c62f3780bdc4976a9d25e6b0c217170558e Author: Brad King brad.k...@kitware.com AuthorDate: Wed Jun 20 10:14:23 2012 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Wed Jun 20 10:19:44 2012 -0400 Make CTest.UpdateGIT robust to Git safecrlf on Windows If the user has configured 'core.autocrlf' and 'core.safecrlf' then 'git submodule add' will fail to 'git add' the '.gitmodules' file because it has LF newlines, at least as of Git 1.7.11. Disable 'core.safecrlf' in our test repository to avoid the problem. diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in index 793b987..eb9f987 100644 --- a/Tests/CTestUpdateGIT.cmake.in +++ b/Tests/CTestUpdateGIT.cmake.in @@ -91,6 +91,9 @@ run_child(WORKING_DIRECTORY ${TOP}/import COMMAND ${GIT} add . ) run_child(WORKING_DIRECTORY ${TOP}/import + COMMAND ${GIT} config core.safecrlf false + ) +run_child(WORKING_DIRECTORY ${TOP}/import COMMAND ${GIT} submodule add ${MOD_REPO} module ) run_child(WORKING_DIRECTORY ${TOP}/import --- Summary of changes: Source/CMakeVersion.cmake |2 +- Tests/CTestUpdateGIT.cmake.in |3 +++ 2 files changed, 4 insertions(+), 1 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v2.8.8-3270-g31b4764
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 31b47642977c95e1b45a91db167f0a4329dbf7e9 (commit) via 56148fd2bc5ddbf32b89bbf94034ea4b14c6716d (commit) from 8d1bb7cf2d6c0505e9827f4da18f5dc754cb6054 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=31b47642977c95e1b45a91db167f0a4329dbf7e9 commit 31b47642977c95e1b45a91db167f0a4329dbf7e9 Merge: 8d1bb7c 56148fd Author: Brad King brad.k...@kitware.com AuthorDate: Wed Jun 20 11:35:19 2012 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Wed Jun 20 11:35:19 2012 -0400 Merge topic 'module-no-soname' into next 56148fd Do not crash on SHARED library without language (#13324) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=56148fd2bc5ddbf32b89bbf94034ea4b14c6716d commit 56148fd2bc5ddbf32b89bbf94034ea4b14c6716d Author: Brad King brad.k...@kitware.com AuthorDate: Wed Jun 20 11:04:35 2012 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Wed Jun 20 11:26:05 2012 -0400 Do not crash on SHARED library without language (#13324) Since commit e1409ac5 (Support building shared libraries or modules without soname, 2012-04-22) CMake crashes on the code add_library(foo SHARED foo.nolang) because the logic to lookup the language's soname flag was moved from cmTarget::GetLibraryNames to cmMakefile::GetSONameFlag without its check for a NULL language. Restore the check for NULL. Add RunCMake.Languages test to cover language error cases like this one. diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 0a709ae..1d78b3a 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2197,8 +2197,12 @@ bool cmMakefile::PlatformIs64Bit() const const char* cmMakefile::GetSONameFlag(const char* language) const { - std::string name = CMAKE_SHARED_LIBRARY_SONAME_; - name += language; + std::string name = CMAKE_SHARED_LIBRARY_SONAME; + if(language) +{ +name += _; +name += language; +} name += _FLAG; return GetDefinition(name.c_str()); } diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 1c6db39..23fc086 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -45,6 +45,7 @@ macro(add_RunCMake_test test) ) endmacro() +add_RunCMake_test(Languages) add_RunCMake_test(ObjectLibrary) add_RunCMake_test(build_command) diff --git a/Tests/RunCMake/Languages/CMakeLists.txt b/Tests/RunCMake/Languages/CMakeLists.txt new file mode 100644 index 000..e8db6b0 --- /dev/null +++ b/Tests/RunCMake/Languages/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/Languages/NoLangSHARED-result.txt b/Tests/RunCMake/Languages/NoLangSHARED-result.txt new file mode 100644 index 000..d00491f --- /dev/null +++ b/Tests/RunCMake/Languages/NoLangSHARED-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Languages/NoLangSHARED-stderr.txt b/Tests/RunCMake/Languages/NoLangSHARED-stderr.txt new file mode 100644 index 000..3f93cf8 --- /dev/null +++ b/Tests/RunCMake/Languages/NoLangSHARED-stderr.txt @@ -0,0 +1 @@ +CMake Error: CMake can not determine linker language for target:NoLang diff --git a/Tests/RunCMake/Languages/NoLangSHARED.cmake b/Tests/RunCMake/Languages/NoLangSHARED.cmake new file mode 100644 index 000..de6adf7 --- /dev/null +++ b/Tests/RunCMake/Languages/NoLangSHARED.cmake @@ -0,0 +1 @@ +add_library(NoLang SHARED foo.nolang) diff --git a/Tests/RunCMake/Languages/RunCMakeTest.cmake b/Tests/RunCMake/Languages/RunCMakeTest.cmake new file mode 100644 index 000..a99548f --- /dev/null +++ b/Tests/RunCMake/Languages/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(NoLangSHARED) diff --git a/Tests/RunCMake/Languages/foo.nolang b/Tests/RunCMake/Languages/foo.nolang new file mode 100644 index 000..e69de29 --- Summary of changes: Source/cmMakefile.cxx |8 ++-- Tests/RunCMake/CMakeLists.txt |1 + .../{find_package = Languages}/CMakeLists.txt |0 .../NoLangSHARED-result.txt} |0 Tests/RunCMake/Languages/NoLangSHARED-stderr.txt |1 + Tests/RunCMake/Languages/NoLangSHARED.cmake|1 + Tests/RunCMake/Languages/RunCMakeTest.cmake|3 +++ .../hello.f = Tests/RunCMake/Languages/foo.nolang |0 8 files changed, 12 insertions(+), 2 deletions(-) copy
[Cmake-commits] CMake branch, next, updated. v2.8.8-3274-gff91125
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via ff911253351b29db9b66aea785b6e790db8a3622 (commit) via 0331a5adde45583e3bca351f2814aea971474671 (commit) via f46903b4b21e5d1c8af9a60e9ea87805b170ed73 (commit) via aa841ae3f388d537d5a12695b9b3e617a43caca8 (commit) from 31b47642977c95e1b45a91db167f0a4329dbf7e9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff911253351b29db9b66aea785b6e790db8a3622 commit ff911253351b29db9b66aea785b6e790db8a3622 Merge: 31b4764 0331a5a Author: Rolf Eike Beer e...@sf-mail.de AuthorDate: Wed Jun 20 12:32:06 2012 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Wed Jun 20 12:32:06 2012 -0400 Merge topic 'qt4-macros' into next 0331a5a Qt4Macros: add some quotes to prevent damage from spaces in the paths f46903b Qt4Macros: improve basename extraction in QT4_ADD_DBUS_INTERFACES aa841ae FindQt4: extend documentation http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0331a5adde45583e3bca351f2814aea971474671 commit 0331a5adde45583e3bca351f2814aea971474671 Author: Rolf Eike Beer e...@sf-mail.de AuthorDate: Wed Jun 20 13:29:45 2012 +0200 Commit: Rolf Eike Beer e...@sf-mail.de CommitDate: Wed Jun 20 18:31:38 2012 +0200 Qt4Macros: add some quotes to prevent damage from spaces in the paths diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index 7170711..68f3c80 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -220,9 +220,9 @@ ENDMACRO (QT4_ADD_RESOURCES) MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename) GET_FILENAME_COMPONENT(_infile ${_interface} ABSOLUTE) - SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) - SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) - SET(_moc${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) + SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) + SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) + SET(_moc${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) GET_SOURCE_FILE_PROPERTY(_nonamespace ${_interface} NO_NAMESPACE) IF(_nonamespace) @@ -241,16 +241,16 @@ MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename) SET(_params ${_params} -i ${_include}) ENDIF(_include) - ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} + ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile} DEPENDS ${_infile} VERBATIM) - SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE) + SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE) - QT4_GENERATE_MOC(${_header} ${_moc}) + QT4_GENERATE_MOC(${_header} ${_moc}) - SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc}) - MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc}) + LIST(APPEND ${_sources} ${_impl} ${_header} ${_moc}) + MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc}) ENDMACRO(QT4_ADD_DBUS_INTERFACE) @@ -306,27 +306,27 @@ MACRO(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optional ENDIF (_optionalBasename) SET(_optionalClassName ${ARGV5}) - SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) - SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) - SET(_moc${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) + SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) + SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) + SET(_moc${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) IF(_optionalClassName) -ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} +ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile} DEPENDS ${_infile} VERBATIM ) ELSE(_optionalClassName) -ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} +ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile} DEPENDS ${_infile} VERBATIM ) ENDIF(_optionalClassName) - QT4_GENERATE_MOC(${_header} ${_moc}) - SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE) - MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc}) + QT4_GENERATE_MOC(${_header} ${_moc}) + SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE) + MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc}) - SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc}) + LIST(APPEND ${_sources} ${_impl} ${_header} ${_moc}) ENDMACRO(QT4_ADD_DBUS_ADAPTOR)
[Cmake-commits] CMake branch, next, updated. v2.8.8-3276-gcafd80b
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via cafd80b1eaddb3279e7e324b8d9d9473304f5e1c (commit) via b9ccaf5f7977b7444a50a7b1dbb1902422f7ab27 (commit) from ff911253351b29db9b66aea785b6e790db8a3622 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cafd80b1eaddb3279e7e324b8d9d9473304f5e1c commit cafd80b1eaddb3279e7e324b8d9d9473304f5e1c Merge: ff91125 b9ccaf5 Author: Brad King brad.k...@kitware.com AuthorDate: Wed Jun 20 15:53:27 2012 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Wed Jun 20 15:53:27 2012 -0400 Merge topic 'CMakeDetermineCCompiler-clear-init' into next b9ccaf5 CMakeDetermineCCompiler: Fix typo _CXX_ - _C_ (#13330) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b9ccaf5f7977b7444a50a7b1dbb1902422f7ab27 commit b9ccaf5f7977b7444a50a7b1dbb1902422f7ab27 Author: Brad King brad.k...@kitware.com AuthorDate: Wed Jun 20 15:38:53 2012 -0400 Commit: Brad King brad.k...@kitware.com CommitDate: Wed Jun 20 15:38:53 2012 -0400 CMakeDetermineCCompiler: Fix typo _CXX_ - _C_ (#13330) Initialize CMAKE_C_COMPILER_INIT before using it, rather than CMAKE_CXX_COMPILER_INIT. diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index 53f558e..9028e8e 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -32,7 +32,7 @@ # _CMAKE_TOOLCHAIN_PREFIX IF(NOT CMAKE_C_COMPILER) - SET(CMAKE_CXX_COMPILER_INIT NOTFOUND) + SET(CMAKE_C_COMPILER_INIT NOTFOUND) # prefer the environment variable CC IF($ENV{CC} MATCHES .+) --- Summary of changes: Modules/CMakeDetermineCCompiler.cmake |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v2.8.8-3279-gcbaa57b
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via cbaa57bc2e31a477023489537ce1c1b450f1c99d (commit) via 91d945a4e9618f1ff6077dbe9f6cd1bd2b9ff733 (commit) via 24c4f18c7272b4eea9e2a85b20f1d18f28be69fa (commit) from cafd80b1eaddb3279e7e324b8d9d9473304f5e1c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cbaa57bc2e31a477023489537ce1c1b450f1c99d commit cbaa57bc2e31a477023489537ce1c1b450f1c99d Merge: cafd80b 91d945a Author: David Cole david.c...@kitware.com AuthorDate: Wed Jun 20 17:50:26 2012 -0400 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Wed Jun 20 17:50:26 2012 -0400 Merge topic 'eliminate-warnings' into next 91d945a Remove unused ivars to eliminate compiler warnings 24c4f18 Remove unused ivars to eliminate compiler warnings http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=91d945a4e9618f1ff6077dbe9f6cd1bd2b9ff733 commit 91d945a4e9618f1ff6077dbe9f6cd1bd2b9ff733 Author: David Cole david.c...@kitware.com AuthorDate: Wed Jun 20 16:55:37 2012 -0400 Commit: David Cole david.c...@kitware.com CommitDate: Wed Jun 20 17:44:10 2012 -0400 Remove unused ivars to eliminate compiler warnings diff --git a/Source/CTest/cmCTestBZR.cxx b/Source/CTest/cmCTestBZR.cxx index 36302df..381c70c 100644 --- a/Source/CTest/cmCTestBZR.cxx +++ b/Source/CTest/cmCTestBZR.cxx @@ -128,13 +128,12 @@ class cmCTestBZR::RevnoParser: public cmCTestVC::LineParser { public: RevnoParser(cmCTestBZR* bzr, const char* prefix, std::string rev): -BZR(bzr), Rev(rev) +Rev(rev) { this-SetLog(bzr-Log, prefix); this-RegexRevno.compile(^([0-9]+)$); } private: - cmCTestBZR* BZR; std::string Rev; cmsys::RegularExpression RegexRevno; virtual bool ProcessLine() diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index df89275..16e3e02 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1416,10 +1416,9 @@ class cmMakefileTargetGeneratorObjectStrings { public: cmMakefileTargetGeneratorObjectStrings(std::vectorstd::string strings, - cmMakefile* mf, cmLocalUnixMakefileGenerator3* lg, std::string::size_type limit): -Strings(strings), Makefile(mf), LocalGenerator(lg), LengthLimit(limit) +Strings(strings), LocalGenerator(lg), LengthLimit(limit) { this-Space = ; } @@ -1454,7 +1453,6 @@ public: } private: std::vectorstd::string Strings; - cmMakefile* Makefile; cmLocalUnixMakefileGenerator3* LocalGenerator; std::string::size_type LengthLimit; std::string CurrentString; @@ -1469,7 +1467,7 @@ cmMakefileTargetGenerator std::string::size_type limit) { cmMakefileTargetGeneratorObjectStrings -helper(objStrings, this-Makefile, this-LocalGenerator, limit); +helper(objStrings, this-LocalGenerator, limit); for(std::vectorstd::string::const_iterator i = this-Objects.begin(); i != this-Objects.end(); ++i) { http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=24c4f18c7272b4eea9e2a85b20f1d18f28be69fa commit 24c4f18c7272b4eea9e2a85b20f1d18f28be69fa Author: Sean McBride s...@rogue-research.com AuthorDate: Wed Jun 20 12:17:15 2012 -0400 Commit: David Cole david.c...@kitware.com CommitDate: Wed Jun 20 17:43:37 2012 -0400 Remove unused ivars to eliminate compiler warnings diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h index 775a4eb..96a75de 100644 --- a/Source/cmOrderDirectories.h +++ b/Source/cmOrderDirectories.h @@ -48,7 +48,6 @@ private: std::vectorstd::string OrderedDirectories; - bool OrderedDirectoriesComputed; std::vectorcmOrderDirectoriesConstraint* ConstraintEntries; std::vectorcmOrderDirectoriesConstraint* ImplicitDirEntries; std::vectorstd::string UserDirectories; --- Summary of changes: Source/CTest/cmCTestBZR.cxx |3 +-- Source/cmMakefileTargetGenerator.cxx |6 ++ Source/cmOrderDirectories.h |1 - 3 files changed, 3 insertions(+), 7 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, master, updated. v2.8.8-382-g9f80ad7
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, master has been updated via 9f80ad7ccbc7eba8d25eeba405a4b5178071b497 (commit) from 30305b989e944d0b5bdff16ba408d636a8c81e91 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f80ad7ccbc7eba8d25eeba405a4b5178071b497 commit 9f80ad7ccbc7eba8d25eeba405a4b5178071b497 Author: Kitware Robot kwro...@kitware.com AuthorDate: Thu Jun 21 00:01:06 2012 -0400 Commit: Kitware Robot kwro...@kitware.com CommitDate: Thu Jun 21 00:01:06 2012 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index fb88d24..8dd5b7f 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,5 @@ SET(CMake_VERSION_MAJOR 2) SET(CMake_VERSION_MINOR 8) SET(CMake_VERSION_PATCH 8) -SET(CMake_VERSION_TWEAK 20120620) +SET(CMake_VERSION_TWEAK 20120621) #SET(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits