[CMake] file(GLOB oddities

2010-08-27 Thread Kevin Fitch
I am running into an issue that causing me a bit of trouble: file(GLOB globOutput test) returns the absolute path to test (assuming there is a test directory under my current dir). Whereas file(GLOB globOutput .) returns an empty string. This is particularly annoying because file(GLOB globOutput no

Re: [CMake] several questions about cmake

2010-08-27 Thread Mark Roden
Hi Michael, The quadruple slashes fixed the problem, thanks! And it turns out that it is valid C++ to have void main() because it's valid C. Source: http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/legality-of-void-main.html It would have made me very nervous to change the validation c

Re: [CMake] several questions about cmake

2010-08-27 Thread Mark Roden
Hi Jed, I don't want portable code. I want the socket++ code that I originally got from someone else to compile as intended on the various platforms they support. They put a void as a return type; that void as a return type is compiling just fine on vs2008, which according to that page, is perfe

Re: [CMake] several questions about cmake

2010-08-27 Thread Michael Wild
c++'98 standard (http://www.kuzbass.ru:8086/docs/isocpp/basic.html#basic.start.main) clearly states that main _MUST_ have int as it's return type. Further it shall be callable as int main(); int main(int argc, char* argv[]); The part that says "but otherwise its type is implementation-defined"

Re: [CMake] several questions about cmake

2010-08-27 Thread Jed Brown
On Fri, 27 Aug 2010 08:10:49 -0700, Mark Roden wrote: > And it turns out that it is valid C++ to have > void main() > > because it's valid C. > > Source: > http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/legality-of-void-main.html You seem to have misread the link (which appears to fal

Re: [CMake] several questions about cmake

2010-08-27 Thread Jed Brown
Quoth Stroustrup (http://www2.research.att.com/~bs/bs_faq2.html#void-main): The definition void main() { /* ... */ } is not and never has been C++, nor has it even been C. See the ISO C++ standard 3.6.1[2] or the ISO C standard 5.1.2.2.1. A conforming implementation accepts

Re: [CMake] file(GLOB oddities

2010-08-27 Thread Ryan Pavlik
On 8/27/10 9:17 AM, Kevin Fitch wrote: I am running into an issue that causing me a bit of trouble: file(GLOB globOutput test) returns the absolute path to test (assuming there is a test directory under my current dir). Whereas file(GLOB globOutput .) returns an empty string. This is particula

Re: [CMake] several questions about cmake

2010-08-27 Thread Mark Roden
Sorry about breaking the back-thread, I only saw the response in the cmake digest and not from a particular response. I think that this code is suspicious anyway, for a number of reasons. They claim out-of-the-box windows compatibility, but I'm getting all sorts of other compilation errors that in

[CMake] CTest problem with MinGW build of CTK

2010-08-27 Thread Dean Inglis
I'm working at getting CTK to build shared on Win32 Vista with mingw32-make. When running ctest (CMake 2.8.2), it cant find the tests (which are in CTK-superbuild/CTK-build/bin) Could not find executable D:/CTK-superbuild/CTK-build/bin/Release/some_test Looked in the following places: and look

[CMake] Undefined symbols when header file with code is included

2010-08-27 Thread Nicholas Kinar
Hello, Since I often use a number of C++ helper functions for my daily programming tasks, I've written a header file (my_util.h) which is then included into a source file (i.e. model.cpp). All helper function code is contained within the header file, and there is not a corresponding my_util

Re: [CMake] Undefined symbols when header file with code is included

2010-08-27 Thread Nicholas Kinar
I believe that this should be sufficient to let CMake know that my header file is in this particular directory, but when I run the generated makefile, I receive the following error: Undefined symbols: "void util::load_matrix(std::basic_stringstd::char_traits, std::allocator >, TNT::Array

Re: [CMake] Undefined symbols when header file with code is included

2010-08-27 Thread Nicholas Kinar
My mistake; linking with code contained in a header file actually works quite well in CMake. Just as the error says, the problem was due to an undefined symbol. In the file my_util.h, I changed template void load_matrix(std::string fileName, TNT::Array2D *M) to void load_matrix(s