Re: [CMake] CMAKE_LANG_OUTPUT_EXTENSION

2013-09-07 Thread Michael Wild
It would be useful if these variables were mentioned in the documentation for 
CMAKE_LANG_OUTPUT_EXTENSION. Otherwise this is hardly discoverable.

Michael

On 06.09.2013 21:28, Robert Maynard wrote:
 Both CMAKE_USER_MAKE_RULES_OVERRIDE{,_LANG} are both documented:
 
 http://cmake.org/cmake/help/v2.8.11/cmake.html#variable:CMAKE_USER_MAKE_RULES_OVERRIDE
 http://cmake.org/cmake/help/v2.8.11/cmake.html#variable:CMAKE_USER_MAKE_RULES_OVERRIDE_LANG
 
 If the documentation isn't sufficient, can you please suggest modifications.
 
 On Fri, Sep 6, 2013 at 8:32 AM, Michael Wild them...@gmail.com wrote:



 On Thu, Sep 5, 2013 at 8:22 AM, Michael Wild them...@gmail.com wrote:

 [snip long rant]


 Sorry, Alex. If had scrolled down a bit more in
 CMakeLANGInformation.cmake, I would have seen the hook variables
 CMAKE_USER_MAKE_RULES_OVERRIDE{,_LANG}. However, can I request that this
 be documented?


 Michael

 --

 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

--

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] CMAKE_LANG_OUTPUT_EXTENSION

2013-09-06 Thread Michael Wild
On Thu, Sep 5, 2013 at 8:22 AM, Michael Wild them...@gmail.com wrote:

 [snip long rant]


Sorry, Alex. If had scrolled down a bit more in
CMakeLANGInformation.cmake, I would have seen the hook variables
CMAKE_USER_MAKE_RULES_OVERRIDE{,_LANG}. However, can I request that this
be documented?


Michael
--

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] CMAKE_LANG_OUTPUT_EXTENSION

2013-09-06 Thread Robert Maynard
Both CMAKE_USER_MAKE_RULES_OVERRIDE{,_LANG} are both documented:

http://cmake.org/cmake/help/v2.8.11/cmake.html#variable:CMAKE_USER_MAKE_RULES_OVERRIDE
http://cmake.org/cmake/help/v2.8.11/cmake.html#variable:CMAKE_USER_MAKE_RULES_OVERRIDE_LANG

If the documentation isn't sufficient, can you please suggest modifications.

On Fri, Sep 6, 2013 at 8:32 AM, Michael Wild them...@gmail.com wrote:



 On Thu, Sep 5, 2013 at 8:22 AM, Michael Wild them...@gmail.com wrote:

 [snip long rant]


 Sorry, Alex. If had scrolled down a bit more in
 CMakeLANGInformation.cmake, I would have seen the hook variables
 CMAKE_USER_MAKE_RULES_OVERRIDE{,_LANG}. However, can I request that this
 be documented?


 Michael

 --

 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
--

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] CMAKE_LANG_OUTPUT_EXTENSION

2013-09-05 Thread Michael Wild
On 04.09.2013 20:42, Michael Wild wrote:
 Dear all
 
 no matter when I try to set CMAKE_{C,CXX}_OUTPUT_EXTENSION, on my Linux
 box using the GNU Makefiles generator the resulting object files always
 have a .o extension. I tried setting it in the cache, before and after
 the project() call. Nothing helps.
 
 Is this a known issue? I tried trawling the archives, but only found
 references to IDE generators ignoring this setting.
 
 Thanks for any help
 
 Michael
 

Seems like commit 422dc631b by Alex kind of broke the user's ability to specify
CMAKE_LANG_OUTPUT_NAME by unconditionally setting it to .o on UNIX and .obj
otherwise. The only solution I can see is to provide/override platform+compiler
specific files which get loaded by CMakeLANGInformation.cmake like this:

---8

cmake_minimum_required(VERSION 2.8)
project(output_extension NONE)

# create fake system- and compiler specific file
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/cmake/Platform)
foreach(id GNU HP Intel MIPSpro PathScale PGI SunPro VisualAge XL)
  foreach(l C CXX)
file(WRITE 
${PROJECT_BINARY_DIR}/cmake/Platform/${CMAKE_SYSTEM_NAME}-${id}-${l}.cmake
  #  SET EXTENSION HERE =
  set(CMAKE_${l}_OUTPUT_EXTENSION .MyFancyExtension)\n
  
include(\${CMAKE_ROOT}/Modules/Platform/\${CMAKE_SYSTEM_NAME}-\${CMAKE_${l}_COMPILER_ID}-${l}.cmake\\n
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)\n
  if(NOT _INCLUDED_FILE)\n

INCLUDE(\${CMAKE_ROOT}/Modules/Platform/\${CMAKE_SYSTEM_NAME}-\${CMAKE_BASE_NAME}.cmake\\n
  OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)\n
  endif()\n
  if(NOT _INCLUDED_FILE)\n
INCLUDE(\${CMAKE_ROOT}/Modules/Platform/\${CMAKE_SYSTEM_NAME}.cmake\ 
OPTIONAL)\n
  endif()\n
  )
  endforeach()
endforeach()
list(INSERT CMAKE_MODULE_PATH 0 ${PROJECT_BINARY_DIR}/cmake)

cmake_policy(PUSH)
cmake_policy(SET CMP0017 OLD)
enable_language(C)
enable_language(CXX)
cmake_policy(POP)

---8

Michael
--

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