MantisBT - CMake
View Issue Details
0011069CMakeCMakepublic2010-07-29 22:562016-06-10 14:31
Guillaume Seguin 
Kitware Robot 
normalminoralways
closedmoved 
CMake-2-8 
 
0011069: Support for -D_REENTRANT (or fix problem in CHECK_FUNCTION_EXISTS)
-D_REENTRANT is a valid (to my knowledge) define arg for gcc (see http://stackoverflow.com/questions/2601753/reentrant-flag-in-pthreads [^]) and is pulled in by some pkgconfig packages (such as directfb.pc). When running
check_function_exists (something) after adding the flags pulled by pkgconfig to CMAKE_REQUIRED_FLAGS, I get :

-- Looking for wnck_window_has_name
Parse error in command line argument: -D_REENTRANT
Should be: VAR:type=value
CMake Error: No cmake script provided.
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Looking for wnck_window_has_name - not found

Manually replacing -D_REENTRANT by -D_REENTRANT=1 fixes the problem. I'm not sure whether the problem is in the arg parsing or in CHECK_FUNCTION_EXISTS itself, but shouldn't this work ?
No tags attached.
Issue History
2010-07-29 22:56Guillaume SeguinNew Issue
2010-12-02 17:17Daniel Richard G.Note Added: 0023686
2012-08-11 11:09David ColeStatusnew => backlog
2012-08-11 11:09David ColeNote Added: 0030220
2016-06-10 14:28Kitware RobotNote Added: 0041736
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0023686)
Daniel Richard G.   
2010-12-02 17:17   
I believe CMAKE_REQUIRED_FLAGS actually specifies command-line flags to CMake, not to the compiler/preprocessor. (The comments in CheckFunctionExists.cmake could certainly be more clear on this point.) That would be why CMake is complaining about things not being in "VAR:type=value" form.

-D directives for the compiler should go in CMAKE_REQUIRED_DEFINITIONS, then.
(0030220)
David Cole   
2012-08-11 11:09   
Sending old, never assigned issues to the backlog.

(The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0041736)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.