[CMake] cmake 2.8.8 doesn't create vfproj for Visual Studio 10
DonRobinson
drobinson at essa.com
Sat Aug 18 00:06:22 EDT 2012
Thanks!
I'll give it a try next week.
Donald Robinson
Sr. Systems Ecologist
ESSA Technologies Ltd.
Vancouver, Canada
www.essa.com
604.535.1997
- audio, video, disco
From: Bill Hoffman [via CMake]
[mailto:ml-node+s3232098n7581287h63 at n2.nabble.com]
Sent: Friday, August 17, 2012 8:35 PM
To: DonRobinson
Subject: Re: cmake 2.8.8 doesn't create vfproj for Visual Studio 10
On 8/17/2012 9:19 PM, DonRobinson wrote:
> Disclaimer - I'm just learning cmake. I read as much as I could before
> posting. I am attempting to use Cmake 2.8.8 to create a to create a
> VS2010 SLN file. I have MS Visual Studio 10, Intel Fortran XE 12.1.2.278
> and MSVC 16.00.40219.01 all installed and work for other mixed language
> solutions (SLN files) created "by hand." Intermediate tests run
> internally by cmake appear to succeed and TryCompile executables are
> built. My listing of source files contains a mix of over 500 .f, .F77,
> .c and .h files. When the SLN file is created all files are incorporated
> into one project (vcxproj), and all .f files are treated as
> non-compilable. From a read of various posts I think that */some
> /*developers have been able to combine all source code into a single
> project file that will compile. I haven't been able to do this! I
> welcome any advice (possibly even example CMakeLists.txt files) or URLs
> about how to proceed. I'm quite stuck at this point. My experience with
> working with hand-built SLN files created from with the VS2010
> environment has been to keep .c code in separate C language projects
> which compile to LIB files that are linked. The .f code (the bulk of the
> code) is compiled separately and the LIB and OBJ files are combined at
> link time.
> ------------------------------------------------------------------------
You have to separate the fortran from the C to get it to work with the
IDE project files. So, all the fortran needs to be in its own
add_library call. You can combine them with the makefiles in CMake but
VS has the restriction that the fortran has to be in a separate target.
Something like this should work:
add_library(fortranlib f1.f f2.f ...)
add_library(clib c1.c c2.c ...)
target_link_libraries(clib fortranlib)
-Bill
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
_____
If you reply to this email, your message will be added to the discussion
below:
http://cmake.3232098.n2.nabble.com/cmake-2-8-8-doesn-t-create-vfproj-for-Vis
ual-Studio-10-tp7581286p7581287.html
To unsubscribe from cmake 2.8.8 doesn't create vfproj for Visual Studio 10,
click here
<http://cmake.3232098.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscri
be_by_code&node=7581286&code=ZHJvYmluc29uQGVzc2EuY29tfDc1ODEyODZ8MTk5OTA4NDE
yMQ==> .
<http://cmake.3232098.n2.nabble.com/template/NamlServlet.jtp?macro=macro_vie
wer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicN
amespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.N
odeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_em
ails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> NAML
-----
Donald Robinson
ESSA Technologies Ltd.
Vancouver, Canada
--
View this message in context: http://cmake.3232098.n2.nabble.com/cmake-2-8-8-doesn-t-create-vfproj-for-Visual-Studio-10-tp7581286p7581288.html
Sent from the CMake mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120817/1b55f090/attachment.htm>
More information about the CMake
mailing list