Hi,
I'm wondering what is the best way to do feature detection or version
checking of cmake itself, in cmake. In particular, I'd like to check for
the OBJECT library feature and either use it or fall back to our current
mechanism if we're using an older cmake.
--
Cheers,
Leif
--
Powered by ww
Poking around some more I think I may have found a better solution.
# Toolchain file
include(FileWithInitFlags.cmake)
set(CMAKE_C_COMPILE_OBJECT
" ${CMAKE_C_FLAGS_INIT} -o
-c ")
And for the custom languages I can add that to
CMakeInformation.cmake. I'm not sure why I didn't th
Glenn, thanks for the tip. Those two options are new to me.
It's not very clear to me how the add_compile_options function works.
Complexity might be added when I mention that I've also defined 4 new
custom languages (all essentially identical to C). When
add_compile_options is executed, will
I've been trying to figure out how to correctly author install steps for
a library that will generate a self-contained folder that can be
distributed and used by others, including a good Config.cmake
file and I ran into what seems like a bug. If you say
install(EXPORT DESTINATION .)
Then th
Something like this should work:
add_compile_options(-std=c99)
set_property(DIRECTORY "/root/p1" PROPERTY COMPILE_OPTIONS "-Os")
set_property(DIRECTORY "/root/p2" PROPERTY COMPILE_OPTIONS "-O1")
or you just use the add_compile_options command in all 3
CMakeLists.txt files. The CMakeLists.txt f
The solution is to add the POSITION_INDENPENDENT_CODE target property
to the C and Fortran convenience library targets.
Thanks again for the help,
nick
On Mon, Aug 4, 2014 at 3:35 PM, Nicolas Bock wrote:
> Hi Chuck,
>
> I am building both static and shared libraries using the object files.
> Af
Hi Chuck,
I am building both static and shared libraries using the object files.
After splitting the Fortran and C source as you suggest, I get the
following linker error:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld:
CMakeFiles/spammpack-serial-C.dir/spamm_get_ti
Hi Chuck,
seems a bit hackish, but works for me :)
Thanks for the trick!
nick
On Fri, Aug 1, 2014 at 12:37 PM, Chuck Atkins wrote:
> Hi Nick,
>
> You could split your target in to two object libraries that combine into a
> singe "real" library:
>
> add_library(foo_f OBJECT ${FOO_F_SOURCES})
>
I converted a project from autotools/handmade makefiles to cmake and
afterwards I added NSIS packaging for win32 builds via the cpack
integration.
Everything was fine while the version patch level was being used, but upon
the next release "0.97" w/o a patch level the resultant installer has the
sh
On 8/4/2014 10:26 AM, Rodrigo Faccioli wrote:
protpred-Gromacs-NSGA2.c:(.text+0x1e): undefined reference to `display_msg'
protpred-Gromacs-NSGA2.c:(.text+0x3e): undefined reference to
`load_parameters_from_file'
protpred-Gromacs-NSGA2.c:(.text+0x58): undefined reference to `ea_nsga2'
protpred-Gro
Hi Rodrigo,
You have to state to cmake all of your source files for compilation,
otherwise they won't be found in the generated makefiles.
You can do this either by writing all file names individually in
add_executable, or create a variable or a list that contains all of the
file names, or assign
Thanks Chuck and Angeliki. Thanks your help.
However, unfortunatelly, I couldn't fix.
In [1] I show all my project. In src directory there is all .c files. In
include directory there is .h files.
The protpred-Gromacs-NSGA2.c is one of executable. The others are:
protpred-Gromacs-Dominance.c,
pro
Hi Rodrigo,
It looks like you are probably missing some source files in your
executable. Is protpred-Gromacs-NSGA2.c the only piece of code that gets
built for the executable? If not, you'll need to make sure that all the
necessary source files get either built into the executable or build as a
Hi Rodrigo,
Where is the implementation of the undefined references?
If it is in another source file (other than protpred-Gromacs-NSGA2.c, which
seems to be the only one you are compiling) you should add it to the
compilation. If it is in another library that is already compiled, you
should add i
Hi,
I'm trying to use cmake in my project. In fact, it is my first time using
cmake.
My CmakeList file is below. You can see it is very simple because I'm
trying to compile a binary.
cmake_minimum_required(VERSION 2.8)
project(2pg_cartesian)
set(PROJECT_VERSION "1.0")
include_directories(${2pg
15 matches
Mail list logo