Hi Robert,
A solution could be to create a custom build type with specific flags by
appending "_" to CMAKE_CXX_FLAGS. In that way one could
specify different flags for different build types and then set them as
default for the project they wish to build. This could work like this for
example, assu
Glad it worked! No I don't think it is automatically an include path, only
the files in the current directory where your sources are should be by
default an include path.
On Tue, Dec 2, 2014 at 9:05 PM, Chris Johnson wrote:
> I'm using Make as my build tool. Here's the failing compile line with
|-- mylib/
| |-- CMakeLists.txt
| |-- myfunc.cpp
| `-- myfunc.h
`-- prog/
|-- CMakeLists.txt
`-- prog.cpp
Cheers!
On Tue, Dec 2, 2014 at 8:09 PM, Bill Hoffman
wrote:
> On 12/2/2014 1:33 PM, Angeliki Chrysochou wrote:
>
>>
>> you should
Hi Bill,
He wrote
"Note also that prog.cpp includes this header via #include "myfunc.h"."
in his first email, so I thought he wants to include it directly.
Cheers!
Angeliki
On Tue, Dec 2, 2014 at 8:09 PM, Bill Hoffman
wrote:
> On 12/2/2014 1:33 PM, Angeliki Chryso
Hi Chris,
Given your file structure
The file structure:
.
|-- bin/
|-- include/
| `-- mylib/
|-- lib/
`-- src/
|-- CMakeLists.txt
|-- mylib/
| |-- CMakeLists.txt
| |-- myfunc.cpp
| `-- myfunc.h
`-- prog/
|-- CMakeLists.txt
`-- prog.cpp
you should a
Hi Lars,
I see...Why don't you set the working directory then to lib1 and lib2, and
use the full path to App to call App? Not sure it will work, but maybe.
Cheers!
Angeliki
On Wed, Nov 19, 2014 at 7:19 PM, Lars wrote:
> Hi Angeliki,
>
> Thank you for the suggestions.
>
> I suspect your first
Hi Lars,
What if you provide the working directory to ADD_CUSTOM_COMMAND like this:
add_custom_command(
OUTPUT
COMMAND command_to_be_executed
DEPENDS ${lib1} ${lib2}
WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
VERBATIM)
Would it work?
Otherwise a trick (more like a ha
Hi Rodrigo,
Glad that it is working for you now. I just wanted to mention that I never
had to set the language as properties to the source files since cmake
detects it from the suffix of the source files you list, or at least I
never had a case where the language was not properly detected.
Other
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
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
e section. I'd be
> happy to be proven wrong but I don't think setting CMAKE_EXE_LINKER_FLAGS
> will give me that level of control.
>
> --
> Glenn
>
>
> On 21 July 2014 09:57, Angeliki Chrysochou
> wrote:
>
>> Hi Glenn,
>>
>> Adding linker fl
Hi Glenn,
Adding linker flags exactly in target_link_libraries is not a very good
practice in my opinion. To add specific linker flags to an executable, you
can use the variable CMAKE_EXE_LINKER_FLAGS, which you can edit before
calling add_executable. You could set this variable accordingly in you
Hi Jörg,
I am not sure if there is a way to do this via cmake, maybe there is and I
don't know it, but I think you need to keep an eye on such things
"manually" in a way. You could use ldd or readelf to see the exact
dependencies of a library in linux.
All the best,
Angeliki
On Wed, Jul 16, 20
Hi Mojca,
I don't know if removing these paths would break your build maybe...I'm
sorry I couldn't help.
Angeliki
On Fri, Jun 27, 2014 at 11:26 AM, Mojca Miklavec wrote:
> On Fri, Jun 27, 2014 at 10:42 AM, Angeliki Chrysochou wrote:
> > Hi Mojca,
> >
> &
Hi Mojca,
>From what I know cmake will look for libraries in the directories specified
in link_directories(${LIBRARY_DIRS}) and for headers in the directories
specified in include_directories(${INCLUDE_DIRS}) and the property
INCLUDE_DIRECTORIES.
http://www.cmake.org/cmake/help/v2.8.8/cmake.html#
scripts contain this value for every instance of TARGET_LINK_LIBRARIES
>> statement. A painful process!
>>
>> Thank you for your response, Angeliki.
>>
>> Mike
>>
>>
>> On 6/26/2014 1:16 AM, Angeliki Chrysochou wrote:
>>
>>> Hi Michael,
Hi Michael,
I think what matters is the correctly set dependencies for your build to
succeed (target_link_libraries). By "statically link" you mean you link
against static libraries that were before shared objects, right? This
should, to my knowledge, not have any influence to how you use
target_l
Hi Haster,
Maybe CMAKE_CURRENT_BINARY_DIR could help you? Look at its description
here: http://www.cmake.org/Wiki/CMake_Useful_Variables
Cheers!
Angeliki
On Tue, Jun 24, 2014 at 1:51 PM, Haster wrote:
> Hi folks,
> I have such problem:
>
> I build different C/C++ programs with gcc and use -f
Hi Aurelien,
Even though it is unsafe and not recommended, you could set policy CMP0002
to old so that cmake silently accepts non-unique target names like this:
cmake_policy(SET CMP0002 OLD)
I can't guarantee that your build will then work however.
Another option is to write your own wrapper to
19 matches
Mail list logo