View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010658CMakeModulespublic2010-05-03 05:392010-11-09 22:57
ReporterAndreas Mohr 
Assigned ToMiguel Figueroa 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionCMake 2.8.3Fixed in VersionCMake 2.8.3 
Summary0010658: FindwxWidgets.cmake: ${wxWidgets_USE_FILE}: does exactly _not_ yield proper Module syntax
DescriptionHi,

bugs as of
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/FindwxWidgets.cmake;h=05c6625a81f99288a12afcc691da8ef6da8f921d;hb=HEAD [^]
(i.e., current):

a)
FindwxWidgets.cmake

For me, wxWidgets_USE_FILE returns "UsewxWidgets.cmake", which on
include(${wxWidgets_USE_FILE})
(as illustrated, I might add)
does exactly not yield any success, since it has invalid Module syntax
(should have been "UsewxWidgets" _without_ extension, for proper CMAKE_MODULE_PATH lookup as a _module_, not _file_).
I.e., _either_ full specification, _or_ module name:

# Prefer an existing customized version, but the user might override

 186 # the FindwxWidgets module and not the UsewxWidgets one.

 187 IF(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")

 188 SET(wxWidgets_USE_FILE

 189 "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")

 190 ELSE(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")

 191 SET(wxWidgets_USE_FILE UsewxWidgets.cmake)

 192 ENDIF(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")


b)
in UsewxWidgets.cmake:
   7 # USAGE

   8 # SET( wxWidgets_USE_LIBS gl xml xrc ) # optionally: more than wx std libs

   9 # FIND_PACKAGE(wxWidgets REQUIRED)

  10 # INCLUDE( ${xWidgets_USE_FILE} )

Should call this ${wxWidgets_USE_FILE} to avoid user confusion due to spelling error.

Frankly, I'm NOT happy with current quality of implementation (not CMake internal implementation and features, but external parts, mind you):
whatever I try, it fails, fails, FAILS:
current status of FindWt.cmake is pretty much unusable (externally managed, of course), FindBoost.cmake has many shortcomings, FindwxWidgets.cmake has _immediate_ glaring usability issues (and also 2 dozen or so bug reports).

I keep having to apply many manual workarounds whatever I look into.

Thanks,

Andreas Mohr
TagsNo tags attached.
Attached Files? file icon bug-10658-FindwxWidgets-use-file-should-not-include-cmake-extension [^] (730 bytes) 2010-05-10 17:12 [Show Content]
? file icon style-usewxwidgets-enhanced-documentation [^] (1,236 bytes) 2010-05-10 17:13 [Show Content]

 Relationships

  Notes
(0020701)
Miguel Figueroa (developer)
2010-05-10 17:16

Could you limit your comments to those related to the FindwxWidgets.cmake module in this issue?

Also, you are welcome to provide patches to the 2 dozen or so bug reports.

Finally, I suppose that the attached patch solves the issues reported here... as soon as you verify this, I will apply them to the repository.
(0020758)
Andreas Mohr (reporter)
2010-05-17 09:33

> Could you limit your comments to those related to the FindwxWidgets.cmake module in this issue?

Might have been a better idea ;)


I applied the patches (both Find and Use file), sole Find difference versus my "corrected" FindwxWidgets (which I'm using) now is:

         COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
- ${wxWidgets_SELECT_OPTIONS} --cxxflags
+ ${wxWidgets_SELECT_OPTIONS} ${wxWidgets_CUSTOM_OPTIONS} --cxxflags
         OUTPUT_VARIABLE wxWidgets_CXX_FLAGS
         RESULT_VARIABLE RET
         ERROR_QUIET
@@ -724,7 +728,7 @@
         wxWidgets_FIND_COMPONENTS "${wxWidgets_FIND_COMPONENTS}")
       EXECUTE_PROCESS(
         COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
- ${wxWidgets_SELECT_OPTIONS} --libs ${wxWidgets_FIND_COMPONENTS}
+ ${wxWidgets_SELECT_OPTIONS} ${wxWidgets_CUSTOM_OPTIONS} --libs ${wxWidgets_FIND_COMPONENTS}
         OUTPUT_VARIABLE wxWidgets_LIBRARIES
         RESULT_VARIABLE RET
         ERROR_QUIET

(I need a wxWidgets_CUSTOM_OPTIONS hack(?)/addition(?) since I have several different wx installs with no way to specifically select --toolkit/--version)



Everything seems to work fine (I'm doing find_package and then including wxWidgets_USE_FILE, build still works exactly as expected).

Thanks a lot!
(0022056)
Miguel Figueroa (developer)
2010-09-01 10:21

Pushed the following commits to stage/cmake.git:

commit 6cb14ebf160b156e842c644392377fd6460327c6
Author: Miguel A. Figueroa-Villanueva <miguelf@ieee.org>
Date: Wed Sep 1 09:34:57 2010 -0400

    STYLE: Clarified/Fixed documentation of UsewxWidgets.

commit 36c15a2f0bc0107074019901f3208891667a4546
Author: Miguel A. Figueroa-Villanueva <miguelf@ieee.org>
Date: Wed Sep 1 00:15:07 2010 -0400

    BUG 0010658: FindwxWidgets USE_FILE should not include .cmake extension.
    
    The wxWidgets_USE_FILE variable to be used with the include command
    should be set to UsewxWidgets; not UsewxWidgets.cmake.

 Issue History
Date Modified Username Field Change
2010-05-03 05:39 Andreas Mohr New Issue
2010-05-10 16:10 Miguel Figueroa Status new => assigned
2010-05-10 16:10 Miguel Figueroa Assigned To => Miguel Figueroa
2010-05-10 17:12 Miguel Figueroa File Added: bug-10658-FindwxWidgets-use-file-should-not-include-cmake-extension
2010-05-10 17:13 Miguel Figueroa File Added: style-usewxwidgets-enhanced-documentation
2010-05-10 17:16 Miguel Figueroa Note Added: 0020701
2010-05-17 09:33 Andreas Mohr Note Added: 0020758
2010-09-01 10:21 Miguel Figueroa Note Added: 0022056
2010-09-01 10:25 Miguel Figueroa Status assigned => resolved
2010-09-01 10:25 Miguel Figueroa Fixed in Version => CMake 2.8.3
2010-09-01 10:25 Miguel Figueroa Resolution open => fixed
2010-09-10 00:00 David Cole Target Version => CMake 2.8.3
2010-11-09 22:57 Philip Lowman Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team