Re: [CMake] Help cmake First project

2014-08-05 Thread Hendrik Sattler
Hi, -lm does not belong to CMAKE_CXX_FLAGS as it is a linker option to link libm. Use target_link_libraries(protpred-Gromacs-NSGA2 m) instead. (Don't search for libm, the linker knows where it is.) It is also more common to use a variable for the list of source files. That would make it also pos

Re: [CMake] Windows Path Issues

2014-08-05 Thread david
Sorry about that. I am using "Git Bash" which is definitely a confusing environment. The compiler is PropGCC - the target is an embedded system. PropGCC ships with GNU Make 3.81 (and "make --version" confirms that is the version of make in my PATH). Perhaps the output of "bash --version" will

Re: [CMake] I have discovered a bug (probably)

2014-08-05 Thread Ivan Hrasko
Not absolutely, CMake still does not know Fortran compiler version, variable is defined but as an empty string... But OK, I wil chage conditions in my other scripts. :) 2014-08-05 22:16 GMT+02:00 Bill Hoffman : > On 8/5/2014 3:57 PM, Ivan Hrasko wrote: > >> >> 3. You can see there is a differen

Re: [CMake] I have discovered a bug (probably)

2014-08-05 Thread Bill Hoffman
On 8/5/2014 3:57 PM, Ivan Hrasko wrote: 3. You can see there is a difference between Fortran version is defined (cmake 3.0.0) and Fortran version is not defined (cmake 2.8.x.x). So behaviour of CMake has changed a lot and I think it is a bug and can cause problems if someone relies on it. I hav

Re: [CMake] Help cmake First project

2014-08-05 Thread Rodrigo Faccioli
Hi, I am thankfull for all help. Now, it is working :-) Radovan, thank you to try to run and your comments. My CMakeList.txt is showed below. I would like to know about best practice to make a CMakeList. If agree, I will compile others executables of my project based on how I compiled this execu

[CMake] I have discovered a bug (probably)

2014-08-05 Thread Ivan Hrasko
1. This is the code CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10 FATAL_ERROR) PROJECT(CMake_Version_Tutorial C CXX Fortran) if(DEFINED CMAKE_C_COMPILER_VERSION) message(STATUS "C version is defined.") else() message(STATUS "C version is not defined.") endif() if(DEFINED CMAKE_CXX_COMPILER_VERSIO

Re: [CMake] Windows Path Issues

2014-08-05 Thread Ivan Hrasko
1. What your environment exactly is? It does not look like Windows only (because I see in your log: bash-3.1$ cmake -G "Unix Makefiles" . ), so I expect you are using something like Cygwin and when you use this kind of environment you can have problems with paths. For example C:/software/propgcc/bi

[CMake] Windows Path Issues

2014-08-05 Thread Ivan Hrasko
1. What your environment exactly is? It does not look like Windows only (because I see in your log: bash-3.1$ cmake -G "Unix Makefiles" . ), so I expect you are using something like Cygwin and when you use this kind of environment you can have problems with paths. For example C:/software/propgcc/bi

[CMake] Windows Path Issues

2014-08-05 Thread david
I'm generally a Linux guy but need this project to work on all three main platforms. I have my toolchain file working nicely in Linux, but for some reason I'm getting an error on Windows. Here's top of the console output: bash-3.1$ cmake -G "Unix Makefiles" . -- The C compiler identificatio

Re: [CMake] CMake 3.0 and Visual Studio 2013 peculiarities

2014-08-05 Thread Clinton Stimpson
On Tuesday, August 05, 2014 11:30:57 AM Nagy-Egri Máté Ferenc wrote: > Hi! > > > > > I have been using CMake for quite some time now, but there are a few things > I don’t understand or I just don’t know how to accomplish. > > 1) Some time ago I posted about Unicode paths inside generated pro

Re: [CMake] Help cmake First project

2014-08-05 Thread Rodrigo Faccioli
Hi, Thanks Angeliki and Bill for your attentation. I have updated my CMakeList.txt based on your post. Below my CMakeList.txt is showed. cmake_minimum_required(VERSION 2.8) # project Information project(2pg_cartesian) set(PROJECT_VERSION "1.0") # add definitions to compiler add_definitions(-std=

[CMake] Resetting CMAKE_Fortran_FLAGS for a specific file

2014-08-05 Thread marco restelli
Hi, I would like to reset CMAKE_Fortran_FLAGS for one specific file in a project. I have tried SET_SOURCE_FILES_PROPERTIES(my_file.f90 PROPERTIES COMPILE_FLAGS "-O0 -g") but it appends the new flags keeping the old ones. How can reset these flags? Specifically, I have some files for which I ne

[CMake] CMake 3.0 and Visual Studio 2013 peculiarities

2014-08-05 Thread Nagy-Egri Máté Ferenc
Hi! I have been using CMake for quite some time now, but there are a few things I don’t understand or I just don’t know how to accomplish. 1) Some time ago I posted about Unicode paths inside generated project files do not work properly. The issue has been fixed. Though this issue is only a