[cmake-developers] Compiling with a programmatic way

2014-12-12 Thread djou akr
To whom it may concern

I am trying to find how to compile in an automatic ( programmatically ) way
a c++ file without the manual way in the terminal (I am on ubuntu)

I mean, while a c++ file is executing it will compile another c++ file at
run time. Of course this with the use of make and cmake.

Thanks in advance
Best regards
-- 

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

Re: [cmake-developers] Fragile OS X version checks failing against 10.10

2014-12-12 Thread Brad King
On 12/12/2014 12:20 PM, Sean McBride wrote:
> in cmCPackPackageMakerGenerator
>   this->PackageCompatibilityVersion = 10.4;

I would appreciate help (a patch) for this one from anyone that
is interested in trying to use the long-deprecated PackageMaker
tool on OS X 10.10 or above.

> if(OSX_VERSION MATCHES "^10\\.[0123]" OR OSX_VERSION MATCHES 
> "ProductVersion:\t10\\.[0123]")

Here is a fix for this one:

 Tests: Fix OS X version check to use component-wise test
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f53a3340

Thanks,
-Brad

-- 

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-developers] Fragile OS X version checks failing against 10.10

2014-12-12 Thread Sean McBride
Hi all,

Dunno why I didn't notice until now, but CMake seems to be doing some fragile 
checks for OS X version numbers.  Specifically in cmCPackPackageMakerGenerator, 
at least 2 things:

1) a 'double' variable:
  this->PackageCompatibilityVersion = 10.4;

10.10 will compare like 10.1 there.


2) a regex:

if(OSX_VERSION MATCHES "^10\\.[0123]" OR OSX_VERSION MATCHES 
"ProductVersion:\t10\\.[0123]")
  message(STATUS "Forcing CTEST_TEST_CPACK=OFF on OSX < 10.4")

Cheers,

-- 

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com 
Mac Software Developer  Montréal, Québec, Canada


-- 

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-developers] [CMake 0015301]: FIND_LIBRARY_USE_LIB64_PATHS doesn't work on Windows OSes

2014-12-12 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://www.cmake.org/Bug/view.php?id=15301 
== 
Reported By:jackcmedia
Assigned To:
== 
Project:CMake
Issue ID:   15301
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2014-12-12 12:03 EST
Last Modified:  2014-12-12 12:03 EST
== 
Summary:FIND_LIBRARY_USE_LIB64_PATHS doesn't work on Windows
OSes
Description: 
Setting up a bi-arch cross-compiling script to generate 32 or 64 bit binaries on
demand.

Found that FIND_LIBRARY_USE_LIB64_PATHS doesn't work on Windows, failing to
locate the 64 bit libraries placed on a folder named "lib64". Renaming said
folder to "lib" makes it work as intended.

Steps to Reproduce: 
1.- Install CMake 3.0.2 (TDM-GCC's MinGW-w64 4.9.2 and CLion are my compiler and
IDE of choice, but are not required).

2.- Set up SFML 2.1 64 bits, a third party library, like this:

  include
  lib64 (x64 libs)

and set the CMake (or environmental variable) SFML_ROOT pointing to the root
folder of the third party library.

3.- Create a minimal CMakeLists.txt, like the following:

cmake_minimum_required(VERSION 2.8)
project(CMakeTest LANGUAGES CXX)

if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
  message(WARNING "Target is 64 bits")
else("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
  message(WARNING "Target is 32 bits")
endif("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")

set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules" ${CMAKE_MODULE_PATH})
find_package(SFML 2.1 REQUIRED graphics system window)

include_directories(${PROJECT_SOURCE_DIR}/)
aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})

if(SFML_FOUND)
  include_directories(${SFML_INCLUDE_DIR})
  target_link_libraries(${PROJECT_NAME} ${SFML_LIBRARIES})
endif()

4.- Create a minimal source file, like the following:

#include 

int main() {
  sf::RenderWindow window2;
  return 0;
}

5.- Download FindSFML.cmake from
https://github.com/LaurentGomila/SFML/blob/2.1/cmake/Modules/FindSFML.cmake and
add it to the project inside ${PROJECT_SOURCE_DIR}/cmake/Modules.

6.- Try to compile and confirm it fails to locate the libraries.

7.- Rename "lib64" to "lib" and compile again. This time, it's a success.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2014-12-12 12:03 jackcmedia 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

Re: [cmake-developers] FindMPI take 2

2014-12-12 Thread Brad King
On 12/11/2014 05:08 AM, Alin Marin Elena wrote:
> I have attached a checked patch for linker. flags with the blocks merged.

Thanks.  I've applied the combined patch for -Xlinker options here:

 FindMPI: Extract -Xlinker options
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0792c48

I'll wait for more iterations on the other side of this thread for
the MPI compiler selection work.

Thanks,
-Brad

-- 

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


Re: [cmake-developers] Volunteering to maintain a new module: FindGSL.cmake

2014-12-12 Thread Brad King
On 12/09/2014 05:56 PM, Thompson, KT wrote:
> I made both of these recommended changes.

Thanks.

> set( GSL_INCLUDE_DIRS ${GSL_INCLUDE_DIR} CACHE PATH "Location of GSL include 
> directives." )
> set( GSL_LIBRARIES ${GSL_LIBRARY};${GSL_CBLAS_LIBRARY} CACHE PATH "GSL 
> libraries." )

These values should not be cached.  They can be dropped from
the mark_as_advanced call too.  They are always re-computed from
the cached values that compose them.

Also please drop trailing whitespace from all source lines.

> How does cmake provide tests for modules like this?
> How is the correctness of the module checked before a release?
> Do you simply rely on release candidates?

Historically that is how it has been done.  However more recently
we've started adding tests for find modules.  See Tests/FindGTK2
for example.  It would be great to have tests come with this patch
for FindGSL.

There are two steps to adding tests for this module:

1. Add a Tests/FindGSL test.  Have Tests/CMakeLists.txt add the
   test if some option is enabled.

2. Set up a nightly dashboard submission using instructions here:

http://www.cmake.org/Wiki/CMake/Git/Dashboard

   Install GSL on the dashboard machine so the test can run.
   Add a dashboard_cache setting to the dashboard script to set
   the option to enable the test.

Thanks,
-Brad

-- 

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