Re: [CMake] CMAKE_C_COMPILE_OBJECT vs
Sorry I had misread that you where still having this problem with CMake 3.4, not that it had resolved your issue. On Thu, Jun 30, 2016 at 4:36 PM, Sam Cristallwrote: > Hi Robert, > > Yes, we are adding the Keil C8051 compiler, which is very old and uses a very > unique command line syntax compared to the others supported by CMake. Also, > it's Windows only but Wine works -- so we optionally add Wine on non-Windows > platforms. An example would be: > > wine C51.exe INCDIR(/path/to/dir/1/, /path/to/dir/2/) DEBUG DEFINE(FOO_FLAG) > OBJECT(/path/to/output.obj) /path/to/source.c > > To achieve this, we use a wrapper cmake script with the following: > > set(CMAKE_C_COMPILE_OBJECT > "cmake\ > -DWINE=${WINE}\ > -DCOMPILER=\ > -DSOURCE=\ > -DINCLUDES=\"\"\ > -DFLAGS=\" \"\ > -DOBJECT=\ > -P \"${CMAKE_CURRENT_LIST_DIR}/C8051Compile.cmake\"" > ) > > It was important that be separate, as its form is significantly > different than most compilers. Prior to cmake 3.4, it would be very > difficult to handle this, since would append the includes as a list > of directories, and there is no CMAKE_INCLUDE_FLAG suffix variable (need a > closing bracket for INCDIR). > > >> On Jun 30, 2016, at 2:23 PM, Robert Maynard >> wrote: >> >> Hi, >> >> Can you explain what the goal of your compilation wrappers are? Are >> you trying to add a new compiler? >> >> >> >> On Wed, Jun 29, 2016 at 1:41 PM, Sam Cristall wrote: >>> Looks like this was just a change in CMake 3.4. Updated to latest, and >>> everything is working. On Jun 28, 2016, at 5:19 PM, Sam Cristall wrote: I'm trying to implement a cross compilation wrapper and hit a snag with CMAKE_C_COMPILE_OBJECT. I've found that on OSX / Linux (Makefile Generator), and work as expected, however on Windows (MinGW Makefile Generator), has both the flags and includes, whereas is undefined. Is this expected? >>> -- >>> >>> 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://public.kitware.com/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://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] CMAKE_C_COMPILE_OBJECT vs
Hi Robert, Yes, we are adding the Keil C8051 compiler, which is very old and uses a very unique command line syntax compared to the others supported by CMake. Also, it's Windows only but Wine works -- so we optionally add Wine on non-Windows platforms. An example would be: wine C51.exe INCDIR(/path/to/dir/1/, /path/to/dir/2/) DEBUG DEFINE(FOO_FLAG) OBJECT(/path/to/output.obj) /path/to/source.c To achieve this, we use a wrapper cmake script with the following: set(CMAKE_C_COMPILE_OBJECT "cmake\ -DWINE=${WINE}\ -DCOMPILER=\ -DSOURCE=\ -DINCLUDES=\"\"\ -DFLAGS=\" \"\ -DOBJECT=\ -P \"${CMAKE_CURRENT_LIST_DIR}/C8051Compile.cmake\"" ) It was important that be separate, as its form is significantly different than most compilers. Prior to cmake 3.4, it would be very difficult to handle this, since would append the includes as a list of directories, and there is no CMAKE_INCLUDE_FLAG suffix variable (need a closing bracket for INCDIR). > On Jun 30, 2016, at 2:23 PM, Robert Maynard> wrote: > > Hi, > > Can you explain what the goal of your compilation wrappers are? Are > you trying to add a new compiler? > > > > On Wed, Jun 29, 2016 at 1:41 PM, Sam Cristall wrote: >> Looks like this was just a change in CMake 3.4. Updated to latest, and >> everything is working. >>> On Jun 28, 2016, at 5:19 PM, Sam Cristall wrote: >>> >>> I'm trying to implement a cross compilation wrapper and hit a snag with >>> CMAKE_C_COMPILE_OBJECT. I've found that on OSX / Linux (Makefile >>> Generator), and work as expected, however on Windows >>> (MinGW Makefile Generator), has both the flags and includes, >>> whereas is undefined. Is this expected? >>> >> -- >> >> 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://public.kitware.com/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://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] CMAKE_C_COMPILE_OBJECT vs
Hi, Can you explain what the goal of your compilation wrappers are? Are you trying to add a new compiler? On Wed, Jun 29, 2016 at 1:41 PM, Sam Cristallwrote: > Looks like this was just a change in CMake 3.4. Updated to latest, and > everything is working. >> On Jun 28, 2016, at 5:19 PM, Sam Cristall wrote: >> >> I'm trying to implement a cross compilation wrapper and hit a snag with >> CMAKE_C_COMPILE_OBJECT. I've found that on OSX / Linux (Makefile >> Generator), and work as expected, however on Windows >> (MinGW Makefile Generator), has both the flags and includes, whereas >> is undefined. Is this expected? >> > -- > > 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://public.kitware.com/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://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] CMAKE_C_COMPILE_OBJECT vs
Looks like this was just a change in CMake 3.4. Updated to latest, and everything is working. > On Jun 28, 2016, at 5:19 PM, Sam Cristallwrote: > > I'm trying to implement a cross compilation wrapper and hit a snag with > CMAKE_C_COMPILE_OBJECT. I've found that on OSX / Linux (Makefile Generator), > and work as expected, however on Windows (MinGW Makefile > Generator), has both the flags and includes, whereas is > undefined. Is this expected? > -- 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://public.kitware.com/mailman/listinfo/cmake
[CMake] CMAKE_C_COMPILE_OBJECT vs
I'm trying to implement a cross compilation wrapper and hit a snag with CMAKE_C_COMPILE_OBJECT. I've found that on OSX / Linux (Makefile Generator), and work as expected, however on Windows (MinGW Makefile Generator), has both the flags and includes, whereas is undefined. Is this expected? Sam Cristall, BSc. EE Director, R skype: sam.cristall phone: +1-780-292-0423 <> Eleven Engineering Inc. 10150 100 st, Suite 800 Edmonton, Alberta Canada, T5J 0P6 -- 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://public.kitware.com/mailman/listinfo/cmake