MantisBT - CMake
View Issue Details
0012548CMakeCMakepublic2011-10-30 08:262014-12-04 08:48
Hong Xu 
Brad King 
normalmajoralways
closedfixed 
x86Windows6.0 (Vista)
CMake 2.8.6 
CMake 2.8.7CMake 2.8.7 
0012548: "Watcom WMake" generator fails if path to CMake contains parentheses
check_function_exists failed to check the existence of functions when specified "Watcom WMake". When checking strdup, it reports it is not found, however, strdup does exist.
Add this line to CMakeLists:

check_function_exists(strdup HAVE_STRDUP)

then:

cmake . -G "Watcom WMake"

HAVE_STRDUP is not set.
No tags attached.
related to 0015279closed Kitware Robot CMake fails with OpenWatcom in default install location 
gz CMakeFiles.tar.gz (33,668) 2011-11-01 19:57
https://public.kitware.com/Bug/file/4104/CMakeFiles.tar.gz
Issue History
2011-10-30 08:26Hong XuNew Issue
2011-10-31 09:07Brad KingNote Added: 0027677
2011-10-31 09:07Brad KingNote Added: 0027678
2011-11-01 06:38Hong XuNote Added: 0027694
2011-11-01 11:02Brad KingNote Added: 0027701
2011-11-01 19:57Hong XuFile Added: CMakeFiles.tar.gz
2011-11-01 19:58Hong XuNote Added: 0027705
2011-11-02 07:58Brad KingNote Added: 0027706
2011-11-03 04:17Hong XuNote Added: 0027713
2011-11-03 09:04Brad KingNote Added: 0027714
2011-11-03 09:04Brad KingAssigned To => Brad King
2011-11-03 09:04Brad KingStatusnew => assigned
2011-11-03 09:04Brad KingCategoryModules => CMake
2011-11-03 09:04Brad KingSummarycheck_function_exists failed to check the existence of functions when specified "Watcom WMake" => "Watcom WMake" generator fails if path to CMake contains parentheses
2011-11-03 09:43Brad KingNote Added: 0027715
2011-11-03 09:43Brad KingStatusassigned => resolved
2011-11-03 09:43Brad KingResolutionopen => fixed
2011-12-16 17:23David ColeFixed in Version => CMake 2.8.7
2011-12-16 17:23David ColeTarget Version => CMake 2.8.7
2012-05-09 15:26David ColeNote Added: 0029447
2012-05-09 15:26David ColeStatusresolved => closed
2014-12-04 08:48Brad KingRelationship addedrelated to 0015279

Notes
(0027677)
Brad King   
2011-10-31 09:07   
I cannot reproduce this:

>type ..\CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
project(FOO C)
include(CheckFunctionExists)
check_function_exists(strdup HAVE_STRDUP)

>cmake .. -G"Watcom WMake"
-- The C compiler identification is Watcom
-- Check for Watcom compiler version
-- Check for working C compiler: C:/WATCOM/binnt/wcl386.exe
-- Check for working C compiler: C:/WATCOM/binnt/wcl386.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Looking for strdup
-- Looking for strdup - found
-- Configuring done
-- Generating done
(0027678)
Brad King   
2011-10-31 09:07   
What is the full output on a fresh build tree when you run CMake? Does the check for working compiler pass?
(0027694)
Hong Xu   
2011-11-01 06:38   
Full output is here:

-- The C compiler identification is Watcom
-- The CXX compiler identification is Watcom
-- Check for Watcom compiler version
-- Check for working C compiler: C:/watcom/binnt/wcl386.exe
-- Check for working C compiler: C:/watcom/binnt/wcl386.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working CXX compiler: C:/watcom/binnt/wcl386.exe
-- Check for working CXX compiler: C:/watcom/binnt/wcl386.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Looking for strdup
-- Looking for strdup - not found
-- Looking for strndup
-- Looking for strndup - not found
-- Configuring done
-- Generating done

ABI info checking is failed.
(0027701)
Brad King   
2011-11-01 11:02   
The ABI check probably fails for the same reason that the strdup check incorrectly fails. Please attach a tarball of the CMakeFiles subdirectory from the top of the build tree. That contains lots of logging information about the checks. You can read CMakeFiles/CMakeError.log to look for details.
(0027705)
Hong Xu   
2011-11-01 19:58   
The file is uploaded.
(0027706)
Brad King   
2011-11-02 07:58   
The CMakeError.log file shows errors caused by spaces in the path to CMake. While CMake normally installs into such paths it appears that support for Watcom with spaces in the path to CMake may be broken. To confirm, please try installing CMake into a path that has no spaces and run it from there. If it works then at least you'll be able to get going until this is fixed.
(0027713)
Hong Xu   
2011-11-03 04:17   
Confirmed. But could you fix this, since it's the default install location. Thanks.
(0027714)
Brad King   
2011-11-03 09:04   
Re 0012548:0027706: It turns out that the problematic characters are the parentheses, not the spaces. This is why it works for some people and not for others. Those running 32-bit windows do not have the parentheses in the default Program Files install location.
(0027715)
Brad King   
2011-11-03 09:43   
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23381d83 [^]
(0029447)
David Cole   
2012-05-09 15:26   
Closing resolved issues that have not been updated in more than 4 months.