[CMake] Source is not rebuild when header changes

2017-08-01 Thread Florian Lindner
Hello, on my project, which I'm currently testing with cmake, I just noticed, that when I modify a header, the project is not rebuilt. The CMakeLists.txt in the root dir is here: https://pastebin.com/vfReTM1N The other CMakeLists.txt resides in root/src and lists all the source (*.cpp) files

Re: [CMake] What is the default build type?

2017-08-01 Thread Florian Lindner
guration: " ${CMAKE_BUILD_TYPE}) Best Thanks, Florian > > > - > > https://cmake.org/cmake/help/v3.0/variable/CMAKE_CONFIGURATION_TYPES.html > > On Mon, Jul 31, 2017 at 9:28 PM, Michael Ellery <mellery...@gmail.com > <mailto:mellery...@gmail.com>> wrote:

Re: [CMake] Source is not rebuild when header changes

2017-08-01 Thread Florian Lindner
here is no local subdirectory "mapping" relative to that file > (which is down in the mapping/config dir) Yes, the include is relative to ./src. Best Thanks, Florian > > > > > On Tue, Aug 1, 2017 at 6:47 AM, Florian Lindner <mailingli...@xgm.de> wrote:

[CMake] How to add project files?

2017-07-13 Thread Florian Lindner
Hello, our project, which is currently using scons is structured like this ROOT - SConstruct - CMakeLists.txt - src/ - SConscript - CMAkeLists.txt - Module1 - somesourcefiles.cpp - tests/ - testsourcefiles.cpp - config/ - configsourcefile.cpp

[CMake] Can not get C++ 11 support enabled

2017-07-10 Thread Florian Lindner
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

[CMake] Append to property COMPILE_DEFINITIONS

2017-07-17 Thread Florian Lindner
Hello, I want to add compile definitions. Since I want to use generator expressions, I can't use add_definitions, but have to use the COMPILE_DEFINITIONS property, but neither: set_property(GLOBAL APPEND PROPERTY COMPILE_DEFINITIONS "-DFOO") for testing or set_property(GLOBAL APPEND

Re: [CMake] Append to property COMPILE_DEFINITIONS

2017-07-17 Thread Florian Lindner
TIONS "FOO") works. But setting it on all targets is exactly what I want. How can I do that? Best, Florian > > > On Tue, Jul 18, 2017 at 12:56 PM, Florian Lindner <mailingli...@xgm.de > <mailto:mailingli...@xgm.de>> wrote: > > Hello, > > I wa

Re: [CMake] Append to property COMPILE_DEFINITIONS

2017-07-18 Thread Florian Lindner
"FOO") > BTW, you don't include the -D when adding to COMPILE_DEFINITIONS, just put > FOO, not -DFOO. Have a read of the docs, they may give you other clues for > this property (e.g. using the ..._CONFIG variant of it). Yeah, I found out that I don't have to add -D. The docs say that g

Re: [CMake] Help on first cmake project

2017-07-09 Thread Florian Lindner
Am 07.07.2017 um 16:47 schrieb J Decker: > > > On Thu, Jul 6, 2017 at 11:45 PM, Florian Lindner <mailingli...@xgm.de > <mailto:mailingli...@xgm.de>> wrote: > > Hello, > > coming from scons I want to take a look into cmake...

Re: [CMake] Append to property COMPILE_DEFINITIONS

2017-07-23 Thread Florian Lindner
Am 22.07.2017 um 15:36 schrieb Craig Scott: > > On Tue, Jul 18, 2017 at 8:50 PM, Florian Lindner <mailingli...@xgm.de > <mailto:mailingli...@xgm.de>> wrote: > > #Works, but I would prefer to have it just once for all targets and at > the top of the

[CMake] Help on first cmake project

2017-07-07 Thread Florian Lindner
Hello, coming from scons I want to take a look into cmake... My CMakeList.txt looks like: cmake_minimum_required (VERSION 3.0) project (ASTE) add_executable(readMesh readMesh.cpp) find_library(precice precice PATHS $ENV{PRECICE_ROOT}/build/last) target_link_libraries(readMesh ${precice})

Re: [CMake] Source is not rebuild when header changes

2017-08-01 Thread Florian Lindner
> generated properly in your case. I'm happy to provide whatever information I can. If you want to download the entire source of the project, tell me. Right now the CMake files are not yet in the repository, but I can create a branch and add them there. My CMake version is 3.8.2. Best, Florian &

[CMake] What is the default build type?

2017-07-31 Thread Florian Lindner
Hello ccmake shows CMAKE_BUILD_TYPE as unset. From the compile commands it looks like also nothing like Debug nor Release. Why is there no well-defined default set? How can I set a default? Thanks, Florian -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ

[CMake] CMake does not find module, though it's in MODULE_PATH

2018-05-07 Thread Florian Lindner
Hello, my CMake 3.6.2 complains about not finding FindEigen3.cmake CMake Error at CMakeLists.txt:62 (find_package): By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Eigen3", but CMake did not find one.

[CMake] cmake finds libxml2 but still says its missing

2018-05-09 Thread Florian Lindner
Am 08.05.2018 um 15:12 schrieb Rolf Eike Beer: > Am 2018-05-08 14:51, schrieb Florian Lindner: >> Hello, >> >> I try to compile my software like >> >> cmake -DCMAKE_TOOLCHAIN_FILE=../../toolchain.cmake -DBUILD_SHARED_LIBS=off >> ../.. >> >>&

[CMake] cmake finds libxml2 but still says its missing

2018-05-08 Thread Florian Lindner
Hello, I try to compile my software like cmake -DCMAKE_TOOLCHAIN_FILE=../../toolchain.cmake -DBUILD_SHARED_LIBS=off ../.. > cat ../../toolchain.cmake SET(CMAKE_SYSTEM_NAME Hazelhen) SET(CMAKE_C_COMPILER cc) SET(CMAKE_CXX_COMPILER CC) SET(CMAKE_Fortran_COMPILER ftn) which gives me the

[CMake] Cache variables from module

2018-05-03 Thread Florian Lindner
Hello, I have a third party FindPETSc.cmake module: https://github.com/jedbrown/cmake-modules/blob/master/FindPETSc.cmake The problem I have, is that variable PETSC_VERSION is not set when cmake is run for a second time https://github.com/jedbrown/cmake-modules/issues/28 What is best way to

Re: [CMake] MPI: Undefined symbol

2018-08-21 Thread Florian Lindner
Hello, Am 20.08.18 um 17:49 schrieb Rafael Sadowski: > On Mon Aug 20, 2018 at 04:24:07PM +0200, Florian Lindner wrote: >> Hello, >> >> copied from a working MPI CMakeLists.txt: >> >> find_package(MPI REQUIRED) > > https://cmake.org/cmake/help/v

[CMake] MPI: Undefined symbol

2018-08-20 Thread Florian Lindner
Hello, copied from a working MPI CMakeLists.txt: find_package(MPI REQUIRED) include_directories(${MPI_INCLUDE_PATH}) set(COMPILE_FLAGS ${COMPILE_FLAGS} ${MPI_COMPILE_FLAGS}) set(LINK_FLAGS ${LINK_FLAGS} ${MPI_LINK_FLAGS}) add_executable(StructureSolverParallel

[CMake] Finding a pkg-config file

2018-09-21 Thread Florian Lindner
Hello, on a really weird configured system (but I can't change it), there is a pkg-config file which I want to find with cmake: set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:$ENV{PETSC_DIR}/lib/pkgconfig") set(CMAKE_PREFIX_PATH "$ENV{PETSC_DIR}/lib/pkgconfig") find_package(PkgConfig

[CMake] Correct Boost version found, linked against wrong one

2019-03-12 Thread Florian Lindner
Hello, I have a simple cmake file for a small project. That project uses boost and links again a shared lib that also uses boost: find_library(precice precice PATHS $ENV{PRECICE_ROOT}/build $ENV{PRECICE_ROOT}/build/last) find_package(Boost 1.60.0 REQUIRED COMPONENTS system program_options