Notes |
|
(0037107)
|
Edward Rudd
|
2014-10-29 21:03
|
|
This can be made easier in modern cmake with generator expressions.. That is once a $<COMPILER_LANG:lang> type generator expression is added.. As it would be awesome to do something like this
$<$<AND:$<COMPILER_LANG:C++>,$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNUC>>>:-std=c++11>
OR better yet.. for the target_compile_options just use the fact that the language is known and fail any $<CXX_COMPILER_ID:comp> generator expressions for C or Obj-C code. (but not C++ and Obj-C++). |
|
|
(0037797)
|
Brad King
|
2015-01-23 15:09
|
|
|
|
(0037798)
|
Brad King
|
2015-01-23 15:11
|
|
Re 0014857:0037107: Yes, but the description of the issue explains that adding $<COMPILER_LANG:...> (or whatever name is chosen) and allowing it to work in expected contexts will require some internal API refactoring to thread the "lang" parameter through necessary call stacks. |
|
|
(0037912)
|
Sebastian Sauer
|
2015-02-04 15:27
(edited on: 2015-02-04 15:30) |
|
Related: http://public.kitware.com/pipermail/cmake-developers/2013-May/007210.html [^]
$<$<COMPILE_LANGUAGE:C>:C_ONLY>
$<$<COMPILE_LANGUAGE:CXX>:CXX_ONLY>
$<$<LINK_LANGUAGE:CXX>:LINK_AS_CXX>
A typical use-case, which I just run into and had/have a hard time to workaround, is Makefile code doing this on a library-target that has *.c and *.cpp files:
CFLAGS += -include c_config.h
CXXFLAGS += -include cpp_config.h
|
|
|
(0038035)
|
Stephen Kelly
|
2015-02-23 15:43
|
|
|
|
(0038204)
|
Stephen Kelly
|
2015-03-11 15:52
|
|
|
|
(0039730)
|
Robert Maynard
|
2015-11-02 09:13
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|