[Cmake-commits] CMake branch, master, updated. v3.5.0-rc3-111-g3dd42fe

2016-02-23 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  3dd42fe4eb600339222c42ed440b37a3d76128d6 (commit)
  from  f389e6d6e2f6e55327b36c944f960bce80230f9e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3dd42fe4eb600339222c42ed440b37a3d76128d6
commit 3dd42fe4eb600339222c42ed440b37a3d76128d6
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Wed Feb 24 00:01:05 2016 -0500
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Wed Feb 24 00:01:05 2016 -0500

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index ba308b9..b983213 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 5)
-set(CMake_VERSION_PATCH 20160223)
+set(CMake_VERSION_PATCH 20160224)
 #set(CMake_VERSION_RC 1)

---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


Re: [CMake] Code::blocks: parallel build from IDE

2016-02-23 Thread Alexander Neundorf
On Sunday, January 17, 2016 14:01:59 Alexander Neundorf wrote:
> On Sunday, January 17, 2016 13:45:34 Dimitri Kaparis wrote:
> > On Sat, Jan 9, 2016 at 9:16 PM, Alexander Neundorf
> > > 
> > wrote:
> > > On Saturday, January 09, 2016 12:27:48 Dimitri Kaparis wrote:
> > > > Greetings,
> > > > 
> > > > I'm using the "CodeBlocks - Unix Makefiles" generator under linux to
> > > 
> > > create
> > > 
> > > > a build tree for my project consisting of multiple executables and
> > > > libraries.
> > > > From the command line, I could use make -jN switch from the root of
> > > > the
> > > > build tree to invoke a full build in parallel, but I see no way of
> > > > doing
> > > > that from the Code Blocks IDE.
> > > 
> > > Oops, sorry, that's not implemented for C::B.
> > > 
> > > Alex
> > 
> > Any plans on it,
> 
> yes, but not commited yet.

it's in next now.
CMake now tries to figure out the number of CPUs, and sets the (new) cache 
variable CMAKE_CODEBLOCKS_MAKE_ARGUMENTS to "-jN".
If you don't like the result, you can set it to something else.

Alex


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[Cmake-commits] CMake branch, next, updated. v3.5.0-rc3-248-g4cbf56e

2016-02-23 Thread Alexander Neundorf
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
   via  4cbf56e98c7c3ad3365350bd7ef9314263bb8862 (commit)
   via  84ccd4f7461ac2c2ee471a4d77f3e184c676c276 (commit)
  from  564c9c7b888fdfb156ed5b71de6172a032720c81 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4cbf56e98c7c3ad3365350bd7ef9314263bb8862
commit 4cbf56e98c7c3ad3365350bd7ef9314263bb8862
Merge: 564c9c7 84ccd4f
Author: Alexander Neundorf 
AuthorDate: Tue Feb 23 16:45:28 2016 -0500
Commit: CMake Topic Stage 
CommitDate: Tue Feb 23 16:45:28 2016 -0500

Merge topic 'CodeBlocksParallelFlag' into next

84ccd4f7 CodeBlocks: generate parallel project files (make -j)


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=84ccd4f7461ac2c2ee471a4d77f3e184c676c276
commit 84ccd4f7461ac2c2ee471a4d77f3e184c676c276
Author: Alex Neundorf 
AuthorDate: Tue Feb 23 22:37:44 2016 +0100
Commit: Alex Neundorf 
CommitDate: Tue Feb 23 22:37:44 2016 +0100

CodeBlocks: generate parallel project files (make -j)

This is done the same way as for Eclipse: cmake tries to determine
the number of CPUs, and then adds the respective -jN to the make
invocations in the project file.

Alex

diff --git a/Modules/CMakeFindCodeBlocks.cmake 
b/Modules/CMakeFindCodeBlocks.cmake
index f8d8d59..bf85ea0 100644
--- a/Modules/CMakeFindCodeBlocks.cmake
+++ b/Modules/CMakeFindCodeBlocks.cmake
@@ -23,3 +23,18 @@ endif()
 
 # Determine builtin macros and include dirs:
 
include(${CMAKE_CURRENT_LIST_DIR}/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake)
+
+# Try to find out how many CPUs we have and set the -j argument for make 
accordingly
+set(_CMAKE_CODEBLOCKS_INITIAL_MAKE_ARGS "")
+
+include(ProcessorCount)
+processorcount(_CMAKE_CODEBLOCKS_PROCESSOR_COUNT)
+
+# Only set -j if we are under UNIX and if the make-tool used actually has 
"make" in the name
+# (we may also get here in the future e.g. for ninja)
+if("${_CMAKE_CODEBLOCKS_PROCESSOR_COUNT}" GREATER 1  AND  CMAKE_HOST_UNIX  AND 
 "${CMAKE_MAKE_PROGRAM}" MATCHES make)
+  set(_CMAKE_CODEBLOCKS_INITIAL_MAKE_ARGS 
"-j${_CMAKE_CODEBLOCKS_PROCESSOR_COUNT}")
+endif()
+
+# This variable is used by the CodeBlocks generator and appended to the make 
invocation commands.
+set(CMAKE_CODEBLOCKS_MAKE_ARGUMENTS "${_CMAKE_CODEBLOCKS_INITIAL_MAKE_ARGS}" 
CACHE STRING "Additional command line arguments when CodeBlocks invokes make. 
Enter e.g. -j to get parallel builds")
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx 
b/Source/cmExtraCodeBlocksGenerator.cxx
index 9348ef2..19f99ba 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -300,6 +300,8 @@ void cmExtraCodeBlocksGenerator
   // figure out the compiler
   std::string compiler = this->GetCBCompilerId(mf);
   std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
+  const std::string makeArgs = mf->GetSafeDefinition(
+"CMAKE_CODEBLOCKS_MAKE_ARGUMENTS");
 
   fout<<"\n"
 "\n"
@@ -311,7 +313,8 @@ void cmExtraCodeBlocksGenerator
 "  "<AppendTarget(fout, "all", 0, make.c_str(), lgs[0], compiler.c_str());
+  this->AppendTarget(fout, "all", 0, make.c_str(), lgs[0], compiler.c_str(),
+ makeArgs);
 
   // add all executable and library targets and some of the GLOBAL
   // and UTILITY targets
@@ -333,7 +336,8 @@ void cmExtraCodeBlocksGenerator
  (*lg)->GetBinaryDirectory())==0)
 {
 this->AppendTarget(fout, targetName, 0,
-   make.c_str(), *lg, compiler.c_str());
+   make.c_str(), *lg, compiler.c_str(),
+   makeArgs);
 }
   }
   break;
@@ -350,7 +354,7 @@ void cmExtraCodeBlocksGenerator
 }
 
   this->AppendTarget(fout, targetName, 0,
- make.c_str(), *lg, compiler.c_str());
+ make.c_str(), *lg, compiler.c_str(),makeArgs);
   break;
 case cmState::EXECUTABLE:
 case cmState::STATIC_LIBRARY:
@@ -360,11 +364,11 @@ void cmExtraCodeBlocksGenerator
   {
   cmGeneratorTarget* gt = *ti;
   this->AppendTarget(fout, targetName, gt,
- make.c_str(), *lg, compiler.c_str());
+ make.c_str(), *lg, compiler.c_str(), makeArgs);
   std::string 

Re: [CMake] CheckFortranSourceCompiles alternative for cmake 2.8.12

2016-02-23 Thread victor sv
HI again,

I'm using TRY_COMPILE in a MPI Fortran project with CMake 2.8.11 to check
if the mpi.mod file is compatible with the current Fortran compiler.

The CMake code snippet is as follows:

...
FIND_PATH(MPI_MOD_FOUND mpi.mod  PATHS ${MPI_Fortran_INCLUDE_PATH})
IF(MPI_MOD_FOUND)
TRY_COMPILE(FORTRAN_COMPILER_MATCH_MPI_MOD
${PROJECT_BINARY_DIR}
${SERIAL_TESTS_PATH}/try_compile_mpi_mod.f90
CMAKE_FLAGS

"-DINCLUDE_DIRECTORIES:STRING=${MPI_Fortran_INCLUDE_PATH}"
"-DLINK_LIBRARIES:STRING=${MPI_Fortran_LIBRARIES}")
...

And the Fortan code of try_compile_mpi_mod.f90 is:

program test
use mpi
end program

this is the best choice to ensure the compatibility of current Fortran
compiler and the Fortran compiler used to compile the linked MPI library?

Thanks in advance.

Best regards,
Víctor



2016-02-23 12:46 GMT+01:00 victor sv :

> Thanks Pter!
>
> Is the solution I was looking for. Great, it works as expected! :)
>
>
> 2016-02-23 12:31 GMT+01:00 Petr Kmoch :
>
>> Hi Victor,
>>
>> have a look at the try_compile() command (
>> https://cmake.org/cmake/help/v2.8.12/cmake.html#command:try_compile ),
>> especially the second signature (the one which takes SOURCES).
>>
>> Petr
>>
>> On Tue, Feb 23, 2016 at 11:56 AM, victor sv  wrote:
>>
>>> Hi all,
>>>
>>> I've seen that in CMake 3.0 appeared the nice CheckFortranSourceCompiles
>>> feature.
>>>
>>> Currently, common SO's like Ubuntu 14 includes CMake 2.8.12.2, but not
>>> CMake 3.0 or higher. I would like to check if a very small Fortran test
>>> program compiles using CMake 2.8.12.2, is this possible? how can i do that?
>>>
>>> Best regards,
>>> Víctor.
>>>
>>> --
>>>
>>> Powered by www.kitware.com
>>>
>>> Please keep messages on-topic and check the CMake FAQ at:
>>> http://www.cmake.org/Wiki/CMake_FAQ
>>>
>>> Kitware offers various services to support the CMake community. For more
>>> information on each offering, please visit:
>>>
>>> CMake Support: http://cmake.org/cmake/help/support.html
>>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/cmake
>>>
>>
>>
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[cmake-developers] [CMake 0015984]: "Eclipse CDT4 - Unix Makefiles" does not include subprojects source dir in the Eclipse projects

2016-02-23 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://cmake.org/Bug/view.php?id=15984 
== 
Reported By:Thiago
Assigned To:
== 
Project:CMake
Issue ID:   15984
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2016-02-23 11:00 BRT
Last Modified:  2016-02-23 11:00 BRT
== 
Summary:"Eclipse CDT4 - Unix Makefiles" does not include
subprojects source dir in the Eclipse projects
Description: 
Assuming there is a project called "app1" that adds another sibling project
"lib1" on its CMakeLists.txt. When calling cmake -G "Eclipse CDT4 - Unix
Makefiles" to generate Eclipse projects, not only app1 project is created as the
main project, but both projects are added as virtual [Subprojects], as expected.


That is great, however, only the source code of app1 is indexed by Eclipse. In
order to indexing work for lib1 too, we need to manually right click the project
and go to the "C/C++ Project paths" and add "[Subprojects]" or
"[Subprojects]/lib1" in the Source list. That action would result in a tag being
added to the .cproject:

 is added to 

It would be great if cmake added CMAKE_SOURCE_DIR of all subprojects to the
parent project's .cproject during eclipse project generation


Steps to Reproduce: 
--
App1's CMakeLists.txt
--
cmake_minimum_required(VERSION 3.0)
project(MyApp1)

set(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT TRUE)

add_subdirectory("../lib1" "${CMAKE_CURRENT_BINARY_DIR}/lib1")
add_executable(app1 src/main.cpp)
target_link_libraries(app1 L1)

--
Lib1's CMakeLists.txt
--
cmake_minimum_required(VERSION 3.0)
project(MyLib1)

set(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT TRUE)
add_library(L1 SHARED src/main.cpp)
target_include_directories(L1 PUBLIC
  $
  $
)

Go to an out-of-source dir and run:
cmake -G"Eclipse CDT4 - Unix Makefiles"
-DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE ../../app3/

Import the project on eclipse

Try to see a lib1's function definition from app1 source code.

Only the lib1's header will be found by eclipse. lib1's function definition is
not in the indexing databse and will not be found

Additional Information: 
It is a great addition to https://cmake.org/Bug/view.php?id=12579 as well
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-02-23 11:00 Thiago New Issue
==

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[CMake] CheckFortranSourceCompiles alternative for cmake 2.8.12

2016-02-23 Thread victor sv
Hi all,

I've seen that in CMake 3.0 appeared the nice CheckFortranSourceCompiles
feature.

Currently, common SO's like Ubuntu 14 includes CMake 2.8.12.2, but not
CMake 3.0 or higher. I would like to check if a very small Fortran test
program compiles using CMake 2.8.12.2, is this possible? how can i do that?

Best regards,
Víctor.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] CheckFortranSourceCompiles alternative for cmake 2.8.12

2016-02-23 Thread Petr Kmoch
Hi Victor,

have a look at the try_compile() command (
https://cmake.org/cmake/help/v2.8.12/cmake.html#command:try_compile ),
especially the second signature (the one which takes SOURCES).

Petr

On Tue, Feb 23, 2016 at 11:56 AM, victor sv  wrote:

> Hi all,
>
> I've seen that in CMake 3.0 appeared the nice CheckFortranSourceCompiles
> feature.
>
> Currently, common SO's like Ubuntu 14 includes CMake 2.8.12.2, but not
> CMake 3.0 or higher. I would like to check if a very small Fortran test
> program compiles using CMake 2.8.12.2, is this possible? how can i do that?
>
> Best regards,
> Víctor.
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] CheckFortranSourceCompiles alternative for cmake 2.8.12

2016-02-23 Thread victor sv
Thanks Pter!

Is the solution I was looking for. Great, it works as expected! :)


2016-02-23 12:31 GMT+01:00 Petr Kmoch :

> Hi Victor,
>
> have a look at the try_compile() command (
> https://cmake.org/cmake/help/v2.8.12/cmake.html#command:try_compile ),
> especially the second signature (the one which takes SOURCES).
>
> Petr
>
> On Tue, Feb 23, 2016 at 11:56 AM, victor sv  wrote:
>
>> Hi all,
>>
>> I've seen that in CMake 3.0 appeared the nice CheckFortranSourceCompiles
>> feature.
>>
>> Currently, common SO's like Ubuntu 14 includes CMake 2.8.12.2, but not
>> CMake 3.0 or higher. I would like to check if a very small Fortran test
>> program compiles using CMake 2.8.12.2, is this possible? how can i do that?
>>
>> Best regards,
>> Víctor.
>>
>> --
>>
>> Powered by www.kitware.com
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/cmake
>>
>
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake