As well as moving the add_executable() call after you set the various
CMAKE_CXX... variables, you should also replace the call to
add_compile_options(-std=c++11) with the following:
set(CMAKE_CXX_EXTENSIONS OFF)
On Tue, Jul 11, 2017 at 3:11 PM, Michael Ellery
wrote:
>
> > On Jul 10, 2017, at 1
> On Jul 10, 2017, at 10:07 PM, Florian Lindner wrote:
>
> Hello,
>
> my complete cmake file looks like that:
>
> cmake_minimum_required (VERSION 3.1)
> project(Preallocation)
> add_executable(prealloc prealloc_parallel.cpp)
>
> set(CMAKE_CXX_STANDARD 11)
> set(CMAKE_CXX_STANDARD_REQUIRED ON)
Hello,
my complete cmake file looks like that:
cmake_minimum_required (VERSION 3.1)
project(Preallocation)
add_executable(prealloc prealloc_parallel.cpp)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_compile_options(-std=c++11)
find_library(petsc petsc
PATHS $ENV{PETSC_DI
Thanks for the excellent suggestion. Unfortunately we can't really use
for Visual Studio.
The problem is that the two "add_library" calls result in two visual
studio projects. The
problem with this is that our generated Visual Studio solution already
has 300 odd
projects, using you suggestion would
I am completely new to CMake, and am using to build MySQL 5.7.18 on Windows
10 x64, using the following command:
cmake .. -DDOWNLOAD_BOOST=1 -DWITH_BOOST="C:\Boost" -DENABLE_DOWNLOADS=1
I have VS 2017 installed, and I am on 64 bit machine, but for some reason,
the above command produces the follo
On 07-07-17 05:14, Sean Wayland wrote:
> Hi Micha,
> Thanks very much for the email. That seemed to make a small
> difference! With both those lines commented out these errors are
> generated ( below my email ) .
> I still have included
> project(CATSMAT)
> at the top line of the cmake file in the
It appears to be so -- the install directives execute in incident order, at
least from within a single CMakeLists.txt file.
The solution ended up being INSTALL(CODE "execute_process(COMMAND ...)").
Feels like a bit of a hack, but the install works on two different
platforms -- I'm satisfied for no
> On Jul 10, 2017, at 11:19 AM, Christopher E Robison
> wrote:
>
> The INSTALL(SCRIPT ...) syntax might be just the answer I need, thanks!.
>
> As I mentioned, the index creating script in the custom step needs to operate
> on the copied directory tree in its final location, so if it's not
The INSTALL(SCRIPT ...) syntax might be just the answer I need, thanks!.
As I mentioned, the index creating script in the custom step needs to
operate on the copied directory tree in its final location, so if it's not
all there yet it will fail. So, if CMake has some distinction between
"build" a
Hi David.
In your particular case, you don't have build everything twice. Just make
the SHARED libraries thin wrappers around the OBJECT libraries. Like this:
add_library(obj1 OBJECT a.cpp b.cpp ...)
add_library(lib1 SHARED $)
add_library(obj2 OBJECT c.cpp d.cpp ...)
add_library(lib2 SHARED $)
> On Jul 10, 2017, at 10:46 AM, Christopher E Robison
> wrote:
>
> I've recently begun using CMake on an existing project I've taken over, and I
> feel like I'm mostly getting used to it, though there is still a vast amount
> to learn. I've got nearly the entire project building successfully
I've recently begun using CMake on an existing project I've taken over, and
I feel like I'm mostly getting used to it, though there is still a vast
amount to learn. I've got nearly the entire project building successfully,
with the exception of a directory of external scripts that need to be
confi
Currently you can create an OBJECT library using "add_library(
OBJECT ...)" this populates $ which can then
later be used using something like
"target_sources(name PUBLIC $)". I am wondering if
there is some reason that $ can't be populated when
you create a shared or static library, for instance
13 matches
Mail list logo