Re: [cmake-developers] BISON_TARGET doesn't use CMAKE_CURRENT_BINARY_DIR as WORKING_DIRECTORY

2019-01-08 Thread Brad King via cmake-developers
On 1/8/19 6:44 AM, Brad King wrote:
> On 12/25/18 1:17 AM, Mingjie Xing wrote:
>> The BISON_TARGET will run bison command in CMAKE_CURRENT_SOURCE_DIR.
>>
>> So I just wonder whither it is better for  BISON_TARGET to use
>> CMAKE_CURRENT_BINARY_DIR as WORKING_DIRECTORY.
> 
> Unfortunately this went unnoticed for years after the module was
> added.  Changing it now would require a policy.

See proposed policy here:

  https://gitlab.kitware.com/cmake/cmake/merge_requests/2774

-Brad
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] BISON_TARGET doesn't use CMAKE_CURRENT_BINARY_DIR as WORKING_DIRECTORY

2019-01-08 Thread Brad King via cmake-developers
On 12/25/18 1:17 AM, Mingjie Xing wrote:
> The BISON_TARGET will run bison command in CMAKE_CURRENT_SOURCE_DIR.
> 
> So I just wonder whither it is better for  BISON_TARGET to use
> CMAKE_CURRENT_BINARY_DIR as WORKING_DIRECTORY.

Unfortunately this went unnoticed for years after the module was
added.  Changing it now would require a policy.

-Brad
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


[cmake-developers] BISON_TARGET doesn't use CMAKE_CURRENT_BINARY_DIR as WORKING_DIRECTORY

2018-12-24 Thread Mingjie Xing
Hello,

I run into a problem when use FindBISON module in CMakeLists.txt. The 
BISON_TARGET will run bison command in CMAKE_CURRENT_SOURCE_DIR. The GNU Bison 
has problem for ‘—defines=‘ option because it will always generate the header 
file in the working directory. So, 

BISON_TARGET(Parser ${CMAKE_CURRENT_SOURCE_DIR}/Parser.y
${CMAKE_CURRENT_BINARY_DIR}/Parser.bison
DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/Parser.h)

will not work, because ‘Parser.h’ will be generated under 
CMAKE_CURRENT_SOURCE_DIR.

So I just wonder whither it is better for  BISON_TARGET to use 
CMAKE_CURRENT_BINARY_DIR as WORKING_DIRECTORY.

Thanks
Mingjie
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers