[cmake-developers] [CMake 0014933]: CMake set wrong flags to RC compiler
The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=14933 == Reported By:Mathäus Mendel Assigned To: == Project:CMake Issue ID: 14933 Category: (No Category) Reproducibility:always Severity: minor Priority: normal Status: new == Date Submitted: 2014-05-24 15:29 EDT Last Modified: 2014-05-24 15:29 EDT == Summary:CMake set wrong flags to RC compiler Description: The Microsoft Resource Compiler fails to compile any resource file that have an #include directive. Generating the following error: fatal error RC1015: cannot open include file 'filename.h'. Where filename is any file you may include. Steps to Reproduce: On the CMakeLists.txt, add the following instruction: add_definitions(-WX) # treat warnings as errors. And create a target with a .rc file on it's source list. Additional Information: CMake is passing the CXX/C compiler flags to the Resource Compiler, which it should not. On Modules/Platform/Windows-MSVC.cmake:59 # make sure to enable languages after setting configuration types enable_language(RC) set(CMAKE_COMPILE_RESOURCE rc FLAGS /foOBJECT SOURCE) The MSVC compiler flag -WX will tell the Resource compiler to ignore the INCLUDE env variable and warn on invalid code page, thus, breaking the build. My recommendation is to remove the FLAGS from the directive, since all the compiler flags are meaningless to the Resource compiler, and/or create a new one that will directly reflect the user intention to change the RC compiler behavior, like RC_FLAGS. == Issue History Date ModifiedUsername FieldChange == 2014-05-24 15:29 Mathäus Mendel New Issue 2014-05-24 15:29 Mathäus Mendel File Added: cmake-rc-bug.zip == -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
[cmake-developers] FindFreetype Patches
Here's some patches for the FindFreetype module. The first few patches change formatting. While the last one extends the functionality. -- Taylor Holberton Bay Point, California From 9307dce0496e5b24152ed796b3c4089010009d56 Mon Sep 17 00:00:00 2001 From: Taylor Holberton taylorcholber...@gmail.com Date: Sat, 24 May 2014 21:34:01 -0700 Subject: [PATCH 1/5] Added newlines, reduced code width --- Modules/FindFreetype.cmake | 40 +++- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake index 1779b78..21904e4 100644 --- a/Modules/FindFreetype.cmake +++ b/Modules/FindFreetype.cmake @@ -51,7 +51,9 @@ # wants explicit full paths and this trickery doesn't work too well. # I'm going to attempt to cut out the middleman and hope # everything still works. -find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h +find_path( + FREETYPE_INCLUDE_DIR_ft2build + ft2build.h HINTS ENV FREETYPE_DIR PATHS @@ -62,10 +64,14 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h ENV GTKMM_BASEPATH [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] - PATH_SUFFIXES include/freetype2 include freetype2 + PATH_SUFFIXES +include/freetype2 +include +freetype2 ) -find_path(FREETYPE_INCLUDE_DIR_freetype2 +find_path( + FREETYPE_INCLUDE_DIR_freetype2 NAMES freetype/config/ftheader.h config/ftheader.h @@ -79,11 +85,17 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2 ENV GTKMM_BASEPATH [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] - PATH_SUFFIXES include/freetype2 include freetype2 + PATH_SUFFIXES +include/freetype2 +include +freetype2 ) find_library(FREETYPE_LIBRARY - NAMES freetype libfreetype freetype219 + NAMES +freetype +libfreetype +freetype219 HINTS ENV FREETYPE_DIR PATH_SUFFIXES lib @@ -134,8 +146,18 @@ endif() # handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if # all listed variables are TRUE include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype - REQUIRED_VARS FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS - VERSION_VAR FREETYPE_VERSION_STRING) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + Freetype + REQUIRED_VARS +FREETYPE_LIBRARY +FREETYPE_INCLUDE_DIRS + VERSION_VAR +FREETYPE_VERSION_STRING +) + +mark_as_advanced( + FREETYPE_LIBRARY + FREETYPE_INCLUDE_DIR_freetype2 + FREETYPE_INCLUDE_DIR_ft2build +) -mark_as_advanced(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build) -- 1.7.9.5 From 6ec2c4c5f87fb03d96ad27d11da4139b96f51bec Mon Sep 17 00:00:00 2001 From: Taylor Holberton taylorcholber...@gmail.com Date: Sat, 24 May 2014 21:35:39 -0700 Subject: [PATCH 2/5] Moved PATH_SUFFIXES argument for more consistency --- Modules/FindFreetype.cmake |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake index 21904e4..d9fbb92 100644 --- a/Modules/FindFreetype.cmake +++ b/Modules/FindFreetype.cmake @@ -98,7 +98,6 @@ find_library(FREETYPE_LIBRARY freetype219 HINTS ENV FREETYPE_DIR - PATH_SUFFIXES lib PATHS /usr/X11R6 /usr/local/X11R6 @@ -107,6 +106,8 @@ find_library(FREETYPE_LIBRARY ENV GTKMM_BASEPATH [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] + PATH_SUFFIXES +lib ) # set the user variables -- 1.7.9.5 From 6e7e2c356b17bc5139620e08c5168b09013d0b9b Mon Sep 17 00:00:00 2001 From: Taylor Holberton taylorcholber...@gmail.com Date: Sat, 24 May 2014 21:37:28 -0700 Subject: [PATCH 3/5] Removed caps from find_package_handle_standard_args --- Modules/FindFreetype.cmake |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake index d9fbb92..278c10f 100644 --- a/Modules/FindFreetype.cmake +++ b/Modules/FindFreetype.cmake @@ -147,7 +147,8 @@ endif() # handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if # all listed variables are TRUE include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -FIND_PACKAGE_HANDLE_STANDARD_ARGS( + +find_package_handle_standard_args( Freetype REQUIRED_VARS FREETYPE_LIBRARY -- 1.7.9.5 From cbc682614095c2f992ceb7c9b4256dc1e9c030cc Mon Sep 17 00:00:00 2001 From: Taylor Holberton taylorcholber...@gmail.com Date: Sat, 24 May 2014 21:38:43 -0700 Subject: [PATCH 4/5] Changed 4 to 2 space tab in version search --- Modules/FindFreetype.cmake | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake index 278c10f..f892283 100644 ---
[CMake] Installing only a library dll and not the .lib file
Our project creates a number of dlls that get installed as part of the core component and also has a development library that's an optional install piece. The .lib files only get installed if the development library is selected. I'm able to get these pieces in different components by specifying the component for both the LIBRARY and ARCHIVE destinations. That seems to work ok. However, we don't want to include .lib files for all of the dlls in the development kit, only those that implement official APIs of the product. If I omit the ARCHIVE designation on the install() command, I get the following error: CMake Error at CMakeLists.txt:887 (install): install Library TARGETS given no DESTINATION! How can I install just the .dll file, or failing that cause the ARCHIVE file portion of the install to end up in a bit-bucket so that NSIS never physically installs it? Rick -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Installing only a library dll and not the .lib file
On 24.05.2014 16:51, Rick McGuire wrote: Our project creates a number of dlls that get installed as part of the core component and also has a development library that's an optional install piece. The .lib files only get installed if the development library is selected. I'm able to get these pieces in different components by specifying the component for both the LIBRARY and ARCHIVE destinations. That seems to work ok. However, we don't want to include .lib files for all of the dlls in the development kit, only those that implement official APIs of the product. If I omit the ARCHIVE designation on the install() command, I get the following error: CMake Error at CMakeLists.txt:887 (install): install Library TARGETS given no DESTINATION! How can I install just the .dll file, or failing that cause the ARCHIVE file portion of the install to end up in a bit-bucket so that NSIS never physically installs it? SHARED libraries on Windows have a RUNTIME (.dll) and ARCHIVE (.lib) portion. You can omit one but not both. On Windows the LIBRARY destination is only used for MODULE libraries. Nils -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] How to use LINK_INTERFACE_LIBRARIES
Hello! I'm having a hard time at properly using LINK_INTERFACE_LIBRARIES. From what I understood, setting this property empty for a target avoids transitive dependencies linking. But whatever I try, it doesn't work. I have created a lib A linked against lib B. I'm also creating an exe linked against lib A. But I really don't want it to be linked against lib B. Till now I've tried target_link_libraries(myexe A) target_link_libraries(myexe LINK_INTERFACE_LIBRARIES ) and target_link_libraries(myexe A) set_target_properties(myexe PROPERTIES LINK_INTERFACE_LIBRARIES ) and target_link_libraries(myexe LINK_INTERFACE_LIBRARIES A) But in all these cases the exe gets linked against B :( (which causes loading issues due to RPATH stuff) Does someone know how to use this property? (if it's the right one?) Kind regards, Lucas -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to use LINK_INTERFACE_LIBRARIES
On 24.05.2014 18:15, Lucas Soltic wrote: Hello! I'm having a hard time at properly using LINK_INTERFACE_LIBRARIES. From what I understood, setting this property empty for a target avoids transitive dependencies linking. But whatever I try, it doesn't work. I have created a lib A linked against lib B. I'm also creating an exe linked against lib A. But I really don't want it to be linked against lib B. Till now I've tried target_link_libraries(myexe A) target_link_libraries(myexe LINK_INTERFACE_LIBRARIES ) and target_link_libraries(myexe A) set_target_properties(myexe PROPERTIES LINK_INTERFACE_LIBRARIES ) and target_link_libraries(myexe LINK_INTERFACE_LIBRARIES A) But in all these cases the exe gets linked against B :( (which causes loading issues due to RPATH stuff) Does someone know how to use this property? (if it's the right one?) Kind regards, Lucas target_link_libraries(A PRIVATE B) # A links to B but B is not added to the interface of A target_link_libraries(myexe A) # myexe links to A without B Nils -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Mac @loader_path for @rpath questions
- Original Message - I have a bunch of libraries and frameworks that properly use @rpath. Now I am trying to build an application that uses those library and frameworks via CMake. From this blog: http://www.kitware.com/blog/home/post/510 I see I am supposed to do: set(CMAKE_MACOSX_RPATH 1) The above should be set before declaring an @rpath target, which is one that has an install name with @rpath. set_target_properties(bar PROPERTIES INSTALL_RPATH @loader_path/../lib) The above should be set for any targets that use an @rpath target. So those 2 lines don't necessarily go together. So now, I am trying to improve my user experience with this. So a couple of questions: 1) I noticed it only applies the @loader_path stuff when I install with CMake. I would like this applied during build because install is very unnatural on Mac where drag-and-drop is king. I was expecting set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) to help, but it doesn't seem to have an affect. Setting CMAKE_BUILD_WITH_INSTALL_RPATH should have an effect, if set before any targets that link with the @rpath libraries. Can you provide an example of what you are doing, so we can find out why its not working for you? I understand drag-and-drop, but it doesn't work for my situations. I have several 3rd party libraries that are not in system locations, and are not part of the build tree, so setting CMAKE_BUILD_WITH_INSTALL_RPATH breaks my builds. Install time is where I get a complete .app bundle. 2) I have both .dylibs and .frameworks. It is customary to bundle frameworks in .app/Contents/Frameworks/ and somewhat customary to bundle .dylibs in ./app/Contents/lib This means I need to specify multiple Runtime Search Path (LD_RUNPATH_SEARCH_PATHS) which Apple/Xcode fully allows, i.e. I need both: set_target_properties(bar PROPERTIES INSTALL_RPATH @loader_path/../Frameworks) set_target_properties(bar PROPERTIES INSTALL_RPATH @loader_path/../lib) How do I declare this for CMake? With a list. set_target_properties(bar PROPERTIES INSTALL_RPATH @loader_path/../Frameworks;@loader_path/../lib) 3) What is the common way people copy their frameworks into their .app bundle now-a-days? I do it at install time by setting the install destination to be inside the .app bundle. I was hoping I could get away with: SET_SOURCE_FILES_PROPERTIES( ${MY_LIBRARIES} PROPERTIES MACOSX_PACKAGE_LOCATION Frameworks ) But CMake just creates an empty directory like: .app/Contents/Frameworks/ALmixer.framework with none of the stuff inside the framework. (It doesn't recursively copy the directory.) I've never used MACOSX_PACKAGE_LOCATION, so I'm not sure how it works. Clint -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] How to use LINK_INTERFACE_LIBRARIES
Le 24 mai 2014 à 18:45, Nils Gladitz nilsglad...@gmail.com a écrit : On 24.05.2014 18:15, Lucas Soltic wrote: Hello! I'm having a hard time at properly using LINK_INTERFACE_LIBRARIES. From what I understood, setting this property empty for a target avoids transitive dependencies linking. But whatever I try, it doesn't work. I have created a lib A linked against lib B. I'm also creating an exe linked against lib A. But I really don't want it to be linked against lib B. Till now I've tried target_link_libraries(myexe A) target_link_libraries(myexe LINK_INTERFACE_LIBRARIES ) and target_link_libraries(myexe A) set_target_properties(myexe PROPERTIES LINK_INTERFACE_LIBRARIES ) and target_link_libraries(myexe LINK_INTERFACE_LIBRARIES A) But in all these cases the exe gets linked against B :( (which causes loading issues due to RPATH stuff) Does someone know how to use this property? (if it's the right one?) Kind regards, Lucas target_link_libraries(A PRIVATE B) # A links to B but B is not added to the interface of A target_link_libraries(myexe A) # myexe links to A without B Nils Oh thank you so much that was it! -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] How to build 'install' target or orther custom target in eclipse?
So I've had to pick up eclipse to try and learn it; figured maybe if I took my existing code and generated it as eclipse format I might get a better clue. Now I can right click and bulid the project...but I don't see how to build a specific target like 'install' -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] need help fixing warning message... 3.0
CMake Warning (dev) at C:/general/build/android/karaway/debug_out/core/DefaultInstall.cmake:203 (get_property): Policy CMP0026 is not set: Disallow use of the LOCATION target property. Run cmake --help-policy CMP0026 for policy details. Use the cmake_policy command to set the policy and suppress this warning. The LOCATION property should not be read from target keypad.isp. Use the target name directly with add_custom_command, or use the generator expression $TARGET_FILE, as appropriate. Call Stack (most recent call first): security.null/CMakeLists.txt:23 (my_target_link_libraries) This warning is for project developers. Use -Wno-dev to suppress it. - macro(my_target_link_libraries target ) if(CMAKE_COMPILER_IS_GNUCC AND __ANDROID__ ) foreach( target_lib ${ARGN} ) if( TARGET ${target_lib} ) get_property( lib_path TARGET ${target_lib} PROPERTY LOCATION) get_property( existing_outname TARGET ${target_lib} PROPERTY OUTPUT_NAME ) if( NOT existing_outname ) set( existing_outname ${target_lib} ) endif( NOT existing_outname ) if( ${lib_path} MATCHES (.*)/([^/]*)$ ) get_target_property(existing_link_flags ${target} LINK_FLAGS) if(existing_link_flags) set(new_link_flags ${existing_link_flags} -L ${CMAKE_MATCH_1} -l ${existing_outname}) else() set(new_link_flags -L ${CMAKE_MATCH_1} -l ${existing_outname}) endif() set_target_properties( ${target} PROPERTIES LINK_FLAGS ${new_link_flags}) add_dependencies( ${target} ${target_lib} ) endif( ${lib_path} MATCHES (.*)/([^/]*)$ ) else() target_link_libraries( ${target} ${target_lib} ) endif( TARGET ${target_lib} ) endforeach( target_lib ${ARGN} ) else() target_link_libraries( ${target} ${ARGN} ) endif() endmacro() -- In the script I'm getting LOCATION to know if the referenced library is a full pathname or a short name so I can strip the path appropriately... I don't think the target_file solution works here, what other alternative is there? -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[Cmake-commits] CMake branch, master, updated. v3.0.0-rc6-949-g055da26
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 055da262f150b667fc2322df386b8e8fc4493351 (commit) from 0aee518ac668582aca554b4620ddb1182890b358 (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=055da262f150b667fc2322df386b8e8fc4493351 commit 055da262f150b667fc2322df386b8e8fc4493351 Author: Kitware Robot kwro...@kitware.com AuthorDate: Sun May 25 00:01:09 2014 -0400 Commit: Kitware Robot kwro...@kitware.com CommitDate: Sun May 25 00:01:09 2014 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c1e286c..9c76ecc 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 0) -set(CMake_VERSION_PATCH 20140524) +set(CMake_VERSION_PATCH 20140525) #set(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits